From 34f89b45a9fd6fb6d79aec3ea8f9e87d474a984a Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 14 Mar 2013 00:19:37 +0100 Subject: Guard use of set(CACHE CMAKE_BUILD_TYPE) On multi-config generators, that variable is not set, so cmake fails on it. --- kde-modules/KDECompilerSettings.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kde-modules/KDECompilerSettings.cmake b/kde-modules/KDECompilerSettings.cmake index 6c45b7dd..79ca966e 100644 --- a/kde-modules/KDECompilerSettings.cmake +++ b/kde-modules/KDECompilerSettings.cmake @@ -228,8 +228,9 @@ endif (CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME STREQUAL GNU) # compiler specific settings ############################################################ -set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "DebugFull" "Release" "RelWithDebInfo" "Profile" "Coverage") - +if (CMAKE_BUILD_TYPE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "DebugFull" "Release" "RelWithDebInfo" "Profile" "Coverage") +endif() if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") -- cgit v1.2.1