Add -DNDEBUG to RelWithDebInfo flags where where Release flags had it.
Previously, it was inconsistent in that some platforms/compilers had this flag for the RelWithDebInfo configuration and some didn't. This fixes issue #11366.
This commit is contained in:
parent
addefc2ae3
commit
0ddfc51f6a
|
@ -45,7 +45,7 @@ macro(__compiler_gnu lang)
|
|||
set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-g")
|
||||
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
|
||||
set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
|
||||
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
|
||||
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG")
|
||||
set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
|
||||
set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
|
||||
if(NOT APPLE)
|
||||
|
|
|
@ -4,7 +4,7 @@ set(CMAKE_ASM_FLAGS_INIT "")
|
|||
set(CMAKE_ASM_FLAGS_DEBUG_INIT "-g")
|
||||
set(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
|
||||
set(CMAKE_ASM_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
|
||||
set(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
|
||||
set(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG")
|
||||
|
||||
if(UNIX)
|
||||
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;S)
|
||||
|
|
|
@ -4,7 +4,7 @@ set(CMAKE_C_FLAGS_INIT "")
|
|||
set(CMAKE_C_FLAGS_DEBUG_INIT "-g")
|
||||
set(CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
|
||||
set(CMAKE_C_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG")
|
||||
|
||||
set(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
|
||||
set(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
|
||||
|
|
|
@ -4,7 +4,7 @@ set(CMAKE_CXX_FLAGS_INIT "")
|
|||
set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
|
||||
set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG")
|
||||
|
||||
set(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
|
||||
set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
|
||||
|
|
|
@ -12,7 +12,7 @@ set(CMAKE_ASM_FLAGS_INIT "")
|
|||
set(CMAKE_ASM_FLAGS_DEBUG_INIT "-g")
|
||||
set(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG")
|
||||
set(CMAKE_ASM_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG")
|
||||
set(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-g -xO2")
|
||||
set(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-g -xO2 -DNDEBUG")
|
||||
|
||||
# Initialize ASM link type selection flags. These flags are used when
|
||||
# building a shared library, shared module, or executable that links
|
||||
|
|
|
@ -12,7 +12,7 @@ set(CMAKE_C_FLAGS_INIT "")
|
|||
set(CMAKE_C_FLAGS_DEBUG_INIT "-g")
|
||||
set(CMAKE_C_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG")
|
||||
set(CMAKE_C_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g -xO2")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g -xO2 -DNDEBUG")
|
||||
|
||||
# Initialize C link type selection flags. These flags are used when
|
||||
# building a shared library, shared module, or executable that links
|
||||
|
|
|
@ -12,7 +12,7 @@ set(CMAKE_CXX_FLAGS_INIT "")
|
|||
set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
|
||||
set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-g -xO2")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-g -xO2 -DNDEBUG")
|
||||
|
||||
# Initialize C link type selection flags. These flags are used when
|
||||
# building a shared library, shared module, or executable that links
|
||||
|
|
|
@ -13,6 +13,6 @@ set(CMAKE_Fortran_FLAGS_INIT "")
|
|||
set(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g")
|
||||
set(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG")
|
||||
set(CMAKE_Fortran_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG")
|
||||
set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-g -xO2")
|
||||
set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-g -xO2 -DNDEBUG")
|
||||
set(CMAKE_Fortran_MODDIR_FLAG "-moddir=")
|
||||
set(CMAKE_Fortran_MODPATH_FLAG "-M")
|
||||
|
|
|
@ -5,4 +5,4 @@ set (CMAKE_C_FLAGS_INIT "")
|
|||
set (CMAKE_C_FLAGS_DEBUG_INIT "-g")
|
||||
set (CMAKE_C_FLAGS_MINSIZEREL_INIT "-DNDEBUG")
|
||||
set (CMAKE_C_FLAGS_RELEASE_INIT "-DNDEBUG")
|
||||
set (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g")
|
||||
set (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g -DNDEBUG")
|
||||
|
|
|
@ -8,6 +8,6 @@ set(CMAKE_ASM_FLAGS_INIT "-qthreaded -qalias=noansi -qhalt=e -qsourcetype=assemb
|
|||
set(CMAKE_ASM_FLAGS_DEBUG_INIT "-g")
|
||||
set(CMAKE_ASM_FLAGS_RELEASE_INIT "-O -DNDEBUG")
|
||||
set(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-O -DNDEBUG")
|
||||
set(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-g")
|
||||
set(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-g -DNDEBUG")
|
||||
|
||||
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s )
|
||||
|
|
Loading…
Reference in New Issue