diff options
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/HandleLLVMOptions.cmake | 9 |
1 files changed, 7 insertions, 2 deletions
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" ) |