mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-04-02 15:51:54 +00:00
[cmake] Avoid rel+asserts warnings when passing -UNDEBUG
MSVC 2012 gives warning D9025, "overriding /D NDEBUG with -UNDEBUG". Removing the original definition of NDEBUG silences this. llvm-svn: 178967
This commit is contained in:
parent
594e073ba0
commit
026d8d196d
@ -21,6 +21,9 @@ if( LLVM_ENABLE_ASSERTIONS )
|
||||
# explicitly undefine it:
|
||||
if( uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE" )
|
||||
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}")
|
||||
endif()
|
||||
else()
|
||||
if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE" )
|
||||
|
Loading…
x
Reference in New Issue
Block a user