diff --git a/CMakeLists.txt b/CMakeLists.txt index 426b49e..1d70c2f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 ### diff --git a/TODO.t2t b/TODO.t2t index f3d0cfb..b11bad1 100644 --- a/TODO.t2t +++ b/TODO.t2t @@ -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