mirror of
https://github.com/pdewacht/brlaser
synced 2024-12-27 07:48:21 +01:00
CMake: enable assert() for all build types
This commit is contained in:
parent
ab59a83caa
commit
cf4fbc86ba
@ -12,6 +12,17 @@ include(CheckCXXCompilerFlag)
|
|||||||
include(CheckIncludeFileCXX)
|
include(CheckIncludeFileCXX)
|
||||||
|
|
||||||
|
|
||||||
|
## Enable assertions for all builds
|
||||||
|
## (cmake by default sets NDEBUG for release builds)
|
||||||
|
|
||||||
|
foreach(var
|
||||||
|
CMAKE_CXX_FLAGS_RELEASE
|
||||||
|
CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||||
|
CMAKE_CXX_FLAGS_MINSIZEREL)
|
||||||
|
string(REGEX REPLACE "(^| )[/-]D *NDEBUG($| )" " " "${var}" "${${var}}")
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
|
||||||
## Configure the compiler
|
## Configure the compiler
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
Loading…
Reference in New Issue
Block a user