Commit fc9f3026 authored by Davis King's avatar Davis King

Fixed cmake so it enables/disables the DLIB_ENABLE_ASSERTS switch right.

parent c2199009
......@@ -81,17 +81,18 @@ if (NOT TARGET dlib)
toggle_preprocessor_switch(DLIB_ENABLE_STACK_TRACE)
option(DLIB_ENABLE_ASSERTS ${DLIB_ENABLE_ASSERTS_STR} OFF)
toggle_preprocessor_switch(DLIB_ENABLE_ASSERTS)
if(DLIB_ENABLE_ASSERTS)
# Set these variables so they are set in the config.h.in file when dlib
# is installed.
set (DLIB_DISABLE_ASSERTS false)
set (ENABLE_ASSERTS true)
add_global_define(ENABLE_ASSERTS)
else()
# Set these variables so they are set in the config.h.in file when dlib
# is installed.
set (DLIB_DISABLE_ASSERTS true)
set (ENABLE_ASSERTS false)
remove_global_define(ENABLE_ASSERTS)
endif()
if (DLIB_ISO_CPP_ONLY)
......
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