forked from OSchip/llvm-project
Remove NDBEUG from all release types compile flags.
llvm-svn: 193031
This commit is contained in:
parent
9b759d9fa2
commit
9ea4ea56d1
|
@ -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" )
|
||||
|
|
Loading…
Reference in New Issue