CMake: configurations & compilation flags
This commit is contained in:
parent
77fcc23026
commit
aa88bcf0fd
|
@ -38,19 +38,28 @@ endif()
|
||||||
|
|
||||||
### Options ###
|
### Options ###
|
||||||
|
|
||||||
|
# Configurations
|
||||||
|
set(CMAKE_CONFIGURATION_TYPES
|
||||||
|
Debug Release RelWithDebInfo MinSizeRel
|
||||||
|
CACHE STRING "Set the configurations" FORCE)
|
||||||
|
# Default configuration
|
||||||
|
if (NOT CMAKE_BUILD_TYPE)
|
||||||
|
set(CMAKE_BUILD_TYPE RelWithDebInfo
|
||||||
|
CACHE STRING "Set the default configuration" FORCE)
|
||||||
|
endif()
|
||||||
|
|
||||||
option (DEBUG
|
option (DEBUG
|
||||||
"Enable debug code"
|
"Enable debug code"
|
||||||
on)
|
on)
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
add_definitions(-DDEBUG)
|
add_definitions(-DDEBUG)
|
||||||
endif (DEBUG)
|
endif()
|
||||||
|
|
||||||
option (NDEBUG
|
|
||||||
"Enable no-debug mode (for assert() and others)"
|
### Flags ###
|
||||||
off)
|
|
||||||
if (NDEBUG)
|
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wextra -Wstrict-prototypes")
|
||||||
add_definitions(-DNDEBUG)
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wextra")
|
||||||
endif (NDEBUG)
|
|
||||||
|
|
||||||
|
|
||||||
### Libraries ###
|
### Libraries ###
|
||||||
|
|
1
TODO.t2t
1
TODO.t2t
|
@ -57,7 +57,6 @@ Work to do in OwlPS
|
||||||
|
|
||||||
- CMake:
|
- CMake:
|
||||||
- libraries: version numbers (sonames) and symbolic links
|
- libraries: version numbers (sonames) and symbolic links
|
||||||
- compilation flags
|
|
||||||
- installation targets
|
- installation targets
|
||||||
- static targets
|
- static targets
|
||||||
- compile Positioner
|
- compile Positioner
|
||||||
|
|
Loading…
Reference in New Issue