1
0
mirror of https://github.com/pdewacht/brlaser synced 2024-12-26 15:38:20 +01:00

CMake: enable assert() for all build types

This commit is contained in:
Peter De Wachter 2018-01-26 22:13:59 +01:00
parent ab59a83caa
commit cf4fbc86ba

View File

@ -12,6 +12,17 @@ include(CheckCXXCompilerFlag)
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
set(CMAKE_CXX_STANDARD 11)