cmake: Don't do anything for LLVM_ENABLE_ASSERTIONS=OFF
authorReid Kleckner <reid@kleckner.net>
Fri, 27 Jun 2014 18:17:30 +0000 (18:17 +0000)
committerReid Kleckner <reid@kleckner.net>
Fri, 27 Jun 2014 18:17:30 +0000 (18:17 +0000)
commit3260478c10b56f9ee81cc415c962356b1153cd1c
treec74b22d9ece68578506bb05f368758bc32303f3a
parenta67d14f5a346fa6ad110bbdd4a9c3b87a3c08e4d
cmake: Don't do anything for LLVM_ENABLE_ASSERTIONS=OFF

By default, CMake will set NDEBUG in Rel* builds and leave it off in
debug builds, so we shouldn't need to do anything ourselves.

Before this change, it was possible to a Debug build without assertions
(aka Debug-Asserts in the autoconf system) by configuring with
-DLLVM_ENABLE_ASSERTIONS=OFF, but this configuration isn't very useful.
You can still get the same effect by explicitly adding -DNDEBUG to
CFLAGS.

Differential Revision: http://reviews.llvm.org/D4257

Patch by Janusz Sobczak!

llvm-svn: 211919
llvm/cmake/modules/HandleLLVMOptions.cmake