Added enumeration of valid build types for CMake GUI
authorMarcus D. Hanwell <marcus.hanwell@kitware.com>
Tue, 29 Oct 2013 20:25:41 +0000 (16:25 -0400)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Thu, 7 Nov 2013 09:36:02 +0000 (10:36 +0100)
The CMake GUI (cmake-gui) will display a drop-down list if they are
added as a property to the CMAKE_BUILD_TYPE, making it easier to
select a valid type from the list.

Change-Id: I50b2d8c951b68a13ac7dd80812c2c35365530bb7

CMakeLists.txt

index d243b7f88f324c72f3577286298e507f0149c758..f59cf88057c0ce3a7f1517db9edace8342214a7a 100644 (file)
@@ -65,6 +65,9 @@ include(gmxBuildTypeReference)
 
 if(NOT CMAKE_BUILD_TYPE)
     set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel Reference." FORCE)
+    # Set the possible values of build type for cmake-gui
+    set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
+        "MinSizeRel" "RelWithDebInfo")
 endif(NOT CMAKE_BUILD_TYPE)
 
 enable_language(C)