[PATCH] cmake: NDEBUG needlessly defined in non-Release builds

Reid Kleckner rnk at google.com
Wed Jun 25 10:11:47 PDT 2014


Sure, I can review this.

LLVM_ENABLE_ASSERTIONS is supposed to directly control NDEBUG, and Release/Debug is supposed to control optimizations and debug info.  Therefore IMO this is correct as written.

I imagine it is confusing to users to have to explicitly flip LLVM_ENABLE_ASSERTIONS=ON in a debug build.  I don't think adding tristate logic to detect when the user does a debug build without setting LLVM_ENABLE_ASSERTIONS is worth it, though.

Does that seem reasonable?

I don't know why the VS and XCode logic exists, that seems annoyingly inconsistent.

http://reviews.llvm.org/D4257






More information about the llvm-commits mailing list