fix issue 287, default cmake build type
authorkoda
Fri, 30 Sep 2011 10:43:16 +0200
changeset 6065 0fbb2689cf48
parent 6064 f2b16be53a66
child 6066 b624c30dbbb9
fix issue #287, default cmake build type
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()