diff -r f2b16be53a66 -r 0fbb2689cf48 CMakeLists.txt --- a/CMakeLists.txt Thu Sep 29 16:04:07 2011 +0200 +++ b/CMakeLists.txt Fri Sep 30 10:43:16 2011 +0200 @@ -132,17 +132,17 @@ endif(APPLE) -#this snippet sets "Release" mode by default +#build Debug only when explicitally set if (NOT CMAKE_BUILD_TYPE) - set (CMAKE_BUILD_TYPE RELEASE CACHE STRING "Choose the type of build, options are: None Debug Release." FORCE) + set (CMAKE_BUILD_TYPE RELEASE CACHE STRING "Choose the type of build, options are: Debug Release." FORCE) endif (NOT CMAKE_BUILD_TYPE) -if(CMAKE_BUILD_TYPE MATCHES RELEASE OR CMAKE_BUILD_TYPE MATCHES "Release") +if(CMAKE_BUILD_TYPE MATCHES DEBUG OR CMAKE_BUILD_TYPE MATCHES "Debug" OR CMAKE_BUILD_TYPE MATCHES "debug") + message(STATUS "Building Debug") + set(Optz false) +else() message(STATUS "Building Release") set(Optz true) -else() - message(STATUS "Building Debug") - set(Optz false) endif()