El domingo, 11 de marzo de 2018 1:44:07 (CET) Eli Schwartz via arch-dev-public 
> This theoretically sounds like a fantastic idea, but I'm not really sure
> what CMake's deal with build flags are in the first place. What is the
> default build type, and does CMake even look at build flags from the
> environment at all (at least in a sane manner)?

This is very poorly documented, so you have to dig into the cmake code to 
figure it out. The default build type is None, which means CMAKE_C(XX)_FLAGS is 
used (see /usr/share/cmake-3.10/Modules/CMakeCInformation.cmake:117), whose 
value is taken from the environment C(XX)FLAGS (see 
/usr/share/cmake-3.10/Modules/CMakeCXXInformation.cmake:198). So yes, not 
setting CMAKE_BUILD_TYPE will simply use the build flags from C(XX)FLAGS. If 
you want to test yourself, run cmake with the -LAH flag and check the output 

 > For example, I am currently the maintainer of a package that has,
> apparently, historically used:

The first two lines should not be necessary (see above)

Reply via email to