From 4a295dfbf9c5e8a71b8345484eff200058522b4e Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 27 Jun 2014 18:17:30 +0000 Subject: 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! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211919 91177308-0d34-0410-b5e6-96231b3b80d8 --- cmake/modules/HandleLLVMOptions.cmake | 6 ------ 1 file changed, 6 deletions(-) (limited to 'cmake') diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake index 447ba52ce0..201c2b6254 100644 --- a/cmake/modules/HandleLLVMOptions.cmake +++ b/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) -- cgit v1.2.3