From fc2a53043a9b2fd59b71ab1f8c40a18421771eb7 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Sat, 21 May 2011 01:59:26 -0500 Subject: Coax Xcode into selecting the right build type by default. This is accomplished by dynamically reordering the CMake variable CMAKE_CONFIGURATION_TYPES so that the current build type (the value of CMAKE_BUILD_TYPE) is listed first. --- linden/indra/cmake/00-Common.cmake | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/linden/indra/cmake/00-Common.cmake b/linden/indra/cmake/00-Common.cmake index 7e85ce0..1a24a41 100644 --- a/linden/indra/cmake/00-Common.cmake +++ b/linden/indra/cmake/00-Common.cmake @@ -14,10 +14,13 @@ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-DLL_RELEASE=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=0 -DNDEBUG -DLL_RELEASE_WITH_DEBUG_INFO=1") -# Don't bother with a MinSizeRel build. +# Available build types / configurations. +# Add our current build type first, to coax Xcode into selecting it by default. -set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release;Debug" CACHE STRING - "Supported build types." FORCE) +set(TYPES ${CMAKE_BUILD_TYPE} RelWithDebInfo Release Debug) +list(REMOVE_DUPLICATES TYPES) +set(CMAKE_CONFIGURATION_TYPES ${TYPES} CACHE STRING "Supported build types." FORCE) +unset(TYPES) # Determine the number of bits of this processor -- cgit v1.1