Closed killenb closed 5 years ago
efd3d21 introduces changing CMakeBuildType to upper case
This is not true; content inside CMAKE_BUILD_TYPE
will not change; the build system must not fail to add the coverage target when cmake is invoked for example as:
cmake -DCMAKE_BUILD_TYPE=debug ../
The above invocation is valid AFAIK.
The issue is, on the invocation below we have an error:
cmake ../
CMake Error at CMakeLists.txt: (string):
string no output variable specified
This is caused by missing "
around CMAKE_BUILD_TYPE
and consequently the string
command ends up with one argument when CMAKE_BUILD_TYPE
is not set. Intended behavior is to invoke string
with an empty string and output variable as parameters in this case.
bd0bfc3aef9938f5c9ab9134d97ef0725ec90ee3 should fix this.
efd3d21b49b31fc3cd79c0cd160a235275ad929c introduces changing CMakeBuildType to upper case. However if no build type is specified the string operation fails.
Jenkins did not catch this because it always specifies a build type.
Either introduce a check or revert this commit. I think we have multiple places where the exact upper-lower case of the build type is required. If you keep it carefully grep that you don't miss any to really make it work.