diff options
| author | Reid Kleckner <reid@kleckner.net> | 2014-06-27 18:17:30 +0000 |
|---|---|---|
| committer | Reid Kleckner <reid@kleckner.net> | 2014-06-27 18:17:30 +0000 |
| commit | 3260478c10b56f9ee81cc415c962356b1153cd1c (patch) | |
| tree | c74b22d9ece68578506bb05f368758bc32303f3a | |
| parent | a67d14f5a346fa6ad110bbdd4a9c3b87a3c08e4d (diff) | |
| download | bcm5719-llvm-3260478c10b56f9ee81cc415c962356b1153cd1c.tar.gz bcm5719-llvm-3260478c10b56f9ee81cc415c962356b1153cd1c.zip | |
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
| -rw-r--r-- | llvm/cmake/modules/HandleLLVMOptions.cmake | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake index 447ba52ce09..201c2b62540 100644 --- a/llvm/cmake/modules/HandleLLVMOptions.cmake +++ b/llvm/cmake/modules/HandleLLVMOptions.cmake @@ -67,12 +67,6 @@ if( LLVM_ENABLE_ASSERTIONS ) "${flags_var_to_scrub}" "${${flags_var_to_scrub}}") endforeach() endif() -else() - if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE" ) - if( NOT MSVC_IDE AND NOT XCODE ) - add_definitions( -DNDEBUG ) - endif() - endif() endif() if(WIN32) |

