Explorar o código

Cache CMAKE_BUILD_TYPE string so it shows up in the CMake GUI.

Cameron Hart %!s(int64=14) %!d(string=hai) anos
pai
achega
922a1af1e7
Modificáronse 2 ficheiros con 7 adicións e 5 borrados
  1. 4 3
      CMakeLists.txt
  2. 3 2
      Dependencies/CMakeLists.txt

+ 4 - 3
CMakeLists.txt

@@ -3,9 +3,10 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
 PROJECT(Polycode)
 
 IF(NOT CMAKE_BUILD_TYPE)
-    SET(CMAKE_BUILD_TYPE "Debug")
-    #SET(CMAKE_BUILD_TYPE "Release")
-    MESSAGE("No CMAKE_BUILD_TYPE specified, defaulting to ${CMAKE_BUILD_TYPE}") 
+    SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
+      "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
+      FORCE)
+    MESSAGE("No CMAKE_BUILD_TYPE specified, defaulting to ${CMAKE_BUILD_TYPE}")
 ENDIF(NOT CMAKE_BUILD_TYPE)
 
 IF(APPLE OR WIN32)

+ 3 - 2
Dependencies/CMakeLists.txt

@@ -3,8 +3,9 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
 PROJECT(PolycodeDependencies)
 
 IF(NOT CMAKE_BUILD_TYPE)
-    #SET(CMAKE_BUILD_TYPE "Debug")
-    SET(CMAKE_BUILD_TYPE "Release")
+    SET(CMAKE_BUILD_TYPE Release CACHE STRING
+      "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
+      FORCE)
     MESSAGE("No CMAKE_BUILD_TYPE specified, defaulting to ${CMAKE_BUILD_TYPE}") 
 ENDIF(NOT CMAKE_BUILD_TYPE)