CMake: handle DEBUG and NDEBUG options
This commit is contained in:
parent
dad2e543d1
commit
7598bc9451
|
@ -14,6 +14,23 @@ set(GENERATED_INCLUDE "${PROJECT_BINARY_DIR}/include")
|
||||||
include_directories("${GENERATED_INCLUDE}")
|
include_directories("${GENERATED_INCLUDE}")
|
||||||
|
|
||||||
|
|
||||||
|
### Options ###
|
||||||
|
|
||||||
|
option (DEBUG
|
||||||
|
"Enable debug code"
|
||||||
|
on)
|
||||||
|
if (DEBUG)
|
||||||
|
add_definitions(-DDEBUG)
|
||||||
|
endif (DEBUG)
|
||||||
|
|
||||||
|
option (NDEBUG
|
||||||
|
"Enable no-debug mode (for assert() and others)"
|
||||||
|
off)
|
||||||
|
if (NDEBUG)
|
||||||
|
add_definitions(-DNDEBUG)
|
||||||
|
endif (NDEBUG)
|
||||||
|
|
||||||
|
|
||||||
### Libraries ###
|
### Libraries ###
|
||||||
|
|
||||||
add_subdirectory(libowlps)
|
add_subdirectory(libowlps)
|
||||||
|
|
Loading…
Reference in New Issue