Hello,

currently, we set the CMAKE_BUILD_TYPE to "None". The reason for this is that 
CMake has CMAKE_C{,XX}_FLAGS variables where the corresponding build flags can 
be passed. When the build type is "None", only these flags are used. If the 
build type is however set to anything else, then the flags from CMAKE_C{,XX}
_FLAGS_$TYPE will be appended to the former.

This seems to make sense because the additional variables contain flags that we 
don't want. CMAKE_CXX_FLAGS_RELEASE, for example, defaults to "-O3 -DNDEBUG" 
and we don't want the -O3 flag.
But the "None" type is not really supported and some projects (e. g. LLVM) 
even forbid it. Apart from that projects might add additional flags to these 
variables. They could for example add defines that enable some debug code only 
in debug builds.

It would therefore make sense to set the build type to the right value so that 
these flags can be included. In that case we would also have to set the default 
values of all CMAKE_C{,XX}_FLAGS_$TYPE variables to sensible values that do 
not include any -O flags. CMAKE_CXX_FLAGS_RELEASE would for example only 
contain "-DNDEBUG".

Bernd Steinhauser proposed that we should set the CMake build type based on a 
build_option. What do you think?

Ole

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Exherbo-dev mailing list
[email protected]
http://lists.exherbo.org/mailman/listinfo/exherbo-dev

Reply via email to