From ece40fd6d5a7a2422305d0dba4af814fe6e2e9b6 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Tue, 11 Aug 2015 12:06:04 +0000 Subject: [PATCH] Revert r244516; it was causing cmake configuration failures on Windows with Visual Studio. http://bb.pgr.jp/builders/msbuild-llvmclang-x64-msc18-DA/builds/475 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244589 91177308-0d34-0410-b5e6-96231b3b80d8 --- CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3d753afbeee..adf852e2a44 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,11 @@ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) set(CMAKE_BUILD_TYPE "Debug") endif() +if (CMAKE_BUILD_TYPE AND + NOT CMAKE_BUILD_TYPE MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)$") + message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") +endif() + if(POLICY CMP0022) cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required endif() @@ -152,10 +157,6 @@ endif() string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE) -if (NOT uppercase_CMAKE_BUILD_TYPE MATCHES "^(DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL)$") - message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") -endif() - set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" ) # They are used as destination of target generators. -- 2.34.1