CMakeLists.txt
changeset 6065 0fbb2689cf48
parent 5965 e529b28d10e9
child 6131 4e8816cf9459
--- 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()