llvm.org GIT mirror llvm / 4a295df
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 Reid Kleckner 5 years ago
1 changed file(s) with 0 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
6565 string (REGEX REPLACE "(^| )[/-]D *NDEBUG($| )" " "
6666 "${flags_var_to_scrub}" "${${flags_var_to_scrub}}")
6767 endforeach()
68 endif()
69 else()
70 if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE" )
71 if( NOT MSVC_IDE AND NOT XCODE )
72 add_definitions( -DNDEBUG )
73 endif()
7468 endif()
7569 endif()
7670