From f099f893f3f7ae342bf087f5cbc07c8d9324c0dd Mon Sep 17 00:00:00 2001 From: Yaron Keren Date: Sat, 19 Oct 2013 07:30:37 +0000 Subject: Remove NDBEUG from all release types compile flags. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193031 91177308-0d34-0410-b5e6-96231b3b80d8 --- cmake/modules/HandleLLVMOptions.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'cmake') diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake index 7a45559..bb41a58 100644 --- a/cmake/modules/HandleLLVMOptions.cmake +++ b/cmake/modules/HandleLLVMOptions.cmake @@ -24,8 +24,13 @@ if( LLVM_ENABLE_ASSERTIONS ) if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" ) add_definitions( -UNDEBUG ) # Also remove /D NDEBUG to avoid MSVC warnings about conflicting defines. - string (REGEX REPLACE "(^| )[/-]D *NDEBUG($| )" " " - CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}") + set(REGEXP_NDEBUG "(^| )[/-]D *NDEBUG($| )") + string (REGEX REPLACE "${REGEXP_NDEBUG}" " " + CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}") + string (REGEX REPLACE "${REGEXP_NDEBUG}" " " + CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") + string (REGEX REPLACE "${REGEXP_NDEBUG}" " " + CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL}") endif() else() if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE" ) -- cgit v1.1