aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-03-14 00:19:37 +0100
committerStephen Kelly <steveire@gmail.com>2013-03-14 00:30:02 +0100
commit34f89b45a9fd6fb6d79aec3ea8f9e87d474a984a (patch)
tree03162a45e98d2f86ba588cc7e7fe7bdbb8d2308f
parentb493f2871d9068e826c4e34098b8b71995c1f340 (diff)
downloadextra-cmake-modules-34f89b45a9fd6fb6d79aec3ea8f9e87d474a984a.tar.gz
extra-cmake-modules-34f89b45a9fd6fb6d79aec3ea8f9e87d474a984a.tar.bz2
Guard use of set(CACHE CMAKE_BUILD_TYPE)
On multi-config generators, that variable is not set, so cmake fails on it.
-rw-r--r--kde-modules/KDECompilerSettings.cmake5
1 files 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")