mirror of
https://github.com/thunderbrewhq/system.git
synced 2026-02-04 00:39:08 +00:00
feat(build): add option (WHOA_ASSERTIONS_ENABLED) to toggle assertions independently from CMAKE_BUILD_TYPE
This commit is contained in:
parent
53eefc969f
commit
569b292542
1 changed files with 14 additions and 0 deletions
|
|
@ -88,3 +88,17 @@ elseif(${WHOA_SYSTEM_LINUX})
|
||||||
|
|
||||||
add_definitions(-DWHOA_SYSTEM_VERSION=${WHOA_SYSTEM_VERSION})
|
add_definitions(-DWHOA_SYSTEM_VERSION=${WHOA_SYSTEM_VERSION})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Toggle assertions
|
||||||
|
if(NOT DEFINED WHOA_ASSERTIONS_ENABLED)
|
||||||
|
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
|
set(WHOA_ASSERTIONS_ENABLED 1)
|
||||||
|
else()
|
||||||
|
set(WHOA_ASSERTIONS_ENABLED 0)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WHOA_ASSERTIONS_ENABLED)
|
||||||
|
add_definitions(-DWHOA_ASSERTIONS_ENABLED=1)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue