From 81e77137edf5da28dfa49cd20df86b5231dbe9e0 Mon Sep 17 00:00:00 2001
From: Martyn Gigg <martyn.gigg@stfc.ac.uk>
Date: Wed, 6 Jul 2011 08:05:48 +0000
Subject: [PATCH] Minor tweak to CMAKE_BUILD_TYPE so that the options in the
 GUI are listed rather than requiring a string. Re #3302

---
 Code/Mantid/Build/CMake/CommonSetup.cmake | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Code/Mantid/Build/CMake/CommonSetup.cmake b/Code/Mantid/Build/CMake/CommonSetup.cmake
index 81c0722ec63..8c44b0ea8ea 100644
--- a/Code/Mantid/Build/CMake/CommonSetup.cmake
+++ b/Code/Mantid/Build/CMake/CommonSetup.cmake
@@ -7,7 +7,10 @@ endif ()
 if ( NOT CMAKE_CONFIGURATION_TYPES )
   if ( NOT CMAKE_BUILD_TYPE )
     message ( STATUS "No build type selected, default to Release." )
-    set ( CMAKE_BUILD_TYPE "Release" )
+    set( CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE )
+    # Set the possible values of build type for cmake-gui
+    set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
+      "MinSizeRel" "RelWithDebInfo")
   else ()
     message ( STATUS "Build type is " ${CMAKE_BUILD_TYPE} )
   endif ()
-- 
GitLab