mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-11 10:31:40 +00:00
cmake: Remove -D NDEBUG from CFLAGS as well as CXXFLAGS
This silences ~7 warnings on .c files in the LLVM build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209163 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2f8bca00bb
commit
37b0592215
@ -56,13 +56,16 @@ if( LLVM_ENABLE_ASSERTIONS )
|
|||||||
if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" )
|
if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" )
|
||||||
add_definitions( -UNDEBUG )
|
add_definitions( -UNDEBUG )
|
||||||
# Also remove /D NDEBUG to avoid MSVC warnings about conflicting defines.
|
# Also remove /D NDEBUG to avoid MSVC warnings about conflicting defines.
|
||||||
set(REGEXP_NDEBUG "(^| )[/-]D *NDEBUG($| )")
|
foreach (flags_var_to_scrub
|
||||||
string (REGEX REPLACE "${REGEXP_NDEBUG}" " "
|
CMAKE_CXX_FLAGS_RELEASE
|
||||||
CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
|
CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||||
string (REGEX REPLACE "${REGEXP_NDEBUG}" " "
|
CMAKE_CXX_FLAGS_MINSIZEREL
|
||||||
CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
|
CMAKE_C_FLAGS_RELEASE
|
||||||
string (REGEX REPLACE "${REGEXP_NDEBUG}" " "
|
CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||||
CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL}")
|
CMAKE_C_FLAGS_MINSIZEREL)
|
||||||
|
string (REGEX REPLACE "(^| )[/-]D *NDEBUG($| )" " "
|
||||||
|
"${flags_var_to_scrub}" "${${flags_var_to_scrub}}")
|
||||||
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE" )
|
if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE" )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user