CMake: configurations & compilation flags

This commit is contained in:
Matteo Cypriani 2013-05-18 23:32:32 -04:00 committed by Matteo Cypriani
parent 77fcc23026
commit aa88bcf0fd
2 changed files with 16 additions and 8 deletions

View File

@ -38,19 +38,28 @@ endif()
### 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
"Enable debug code"
on)
if (DEBUG)
add_definitions(-DDEBUG)
endif (DEBUG)
endif()
option (NDEBUG
"Enable no-debug mode (for assert() and others)"
off)
if (NDEBUG)
add_definitions(-DNDEBUG)
endif (NDEBUG)
### Flags ###
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wextra -Wstrict-prototypes")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wextra")
### Libraries ###

View File

@ -57,7 +57,6 @@ Work to do in OwlPS
- CMake:
- libraries: version numbers (sonames) and symbolic links
- compilation flags
- installation targets
- static targets
- compile Positioner