Commit 443b9c6d authored by Davis King's avatar Davis King

Added a cmake option for defining ENABLE_ASSERTS

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402427
parent a8c77d4c
......@@ -40,10 +40,13 @@ set (DLIB_NO_GUI_SUPPORT_STR
"Enable this if you don't want to compile any of the dlib GUI code" )
set (DLIB_ENABLE_STACK_TRACE
"Enable this if you want to turn on the DLIB_STACK_TRACE macros" )
set (DLIB_ENABLE_ASSERTS
"Enable this if you want to turn on the DLIB_ASSERT macro" )
OPTION(DLIB_ISO_CPP_ONLY ${DLIB_ISO_CPP_ONLY_STR} OFF)
OPTION(DLIB_NO_GUI_SUPPORT ${DLIB_NO_GUI_SUPPORT_STR} OFF)
OPTION(DLIB_ENABLE_STACK_TRACE ${DLIB_NO_GUI_SUPPORT_STR} OFF)
OPTION(DLIB_ENABLE_ASSERTS ${DLIB_ENABLE_ASSERTS} OFF)
add_library(dlib all/source.cpp )
......@@ -159,3 +162,11 @@ if (DLIB_ENABLE_STACK_TRACE)
else()
remove_global_define(DLIB_ENABLE_STACK_TRACE)
endif()
if (DLIB_ENABLE_ASSERTS)
add_global_define(DLIB_ENABLE_ASSERTS)
else()
remove_global_define(DLIB_ENABLE_ASSERTS)
endif()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment