[LLVMdev] CMake build maturity

Óscar Fuentes ofv at wanadoo.es
Thu Jun 4 02:27:47 PDT 2009

Jay Foad <jay.foad at gmail.com> writes:

>> Committed a change for the cmake build that implements the option
>> LLVM_ENABLE_ASSERTS. Defaults to ON if and only if CMAKE_BUILD_TYPE is
>> Release.
> Thanks! I think it might be nice to make this a bit more consistent
> with Makefile.config. I'd suggest...


> - have it default to OFF (so assertions are enabled) always

IMHO this is wrong: if the user asks for a release build, assertions
should be turned off by default. The fact that the configure/make build
does not follow this policy caused some surprise among the LLVM
developers and users on the past. So it is the configure/make build the
one that needs to be fixed :-)

> - compile with -DNDEBUG if assertions are off --

Good catch!

> I don't think -UNDEBUG has any effect, because NDEBUG won't have been
> defined in the first place

Right. For Release builds, cmake automatically defines NDEBUG.


More information about the llvm-dev mailing list