[ox] Make OX_NODEBUG a normal variable set in main CMakeLists.txt

This commit is contained in:
Gary Talent 2021-03-12 01:39:02 -06:00
parent 582cbf2041
commit 84705e304f
2 changed files with 5 additions and 1 deletions

View File

@ -24,6 +24,10 @@ set(OX_BUILD_EXEC ${OX_BUILD_EXEC} CACHE BOOL "Build executables (ON/OFF)")
set(OX_USE_STDLIB ${OX_USE_STDLIB} CACHE BOOL "Build libraries that need the std lib (ON/OFF)") set(OX_USE_STDLIB ${OX_USE_STDLIB} CACHE BOOL "Build libraries that need the std lib (ON/OFF)")
set(OX_BARE_METAL ${OX_BARE_METAL} CACHE BOOL "Bare metal build (TRUE/FALSE)") set(OX_BARE_METAL ${OX_BARE_METAL} CACHE BOOL "Bare metal build (TRUE/FALSE)")
if(DEFINED ENV{OX_NODEBUG})
set(OX_NODEBUG ON)
endif()
# can't run tests without building them # can't run tests without building them
if(NOT OX_BUILD_EXEC OR NOT OX_USE_STDLIB) if(NOT OX_BUILD_EXEC OR NOT OX_USE_STDLIB)
set(OX_BUILD_EXEC OFF) set(OX_BUILD_EXEC OFF)

View File

@ -41,7 +41,7 @@ endif()
target_compile_definitions( target_compile_definitions(
OxStd PUBLIC OxStd PUBLIC
$<$<BOOL:${OX_USE_STDLIB}>:OX_USE_STDLIB> $<$<BOOL:${OX_USE_STDLIB}>:OX_USE_STDLIB>
$<$<BOOL:$ENV{OX_NODEBUG}>:OX_NODEBUG> $<$<BOOL:${OX_NODEBUG}>:OX_NODEBUG>
) )
target_link_libraries( target_link_libraries(