From: Justin Bogner Date: Mon, 10 Aug 2015 21:58:27 +0000 (+0000) Subject: cmake: Make CMAKE_BUILD_TYPE check case-insensitive X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=8179d06019a28c0e9febedf349864c918467ebca;p=oota-llvm.git cmake: Make CMAKE_BUILD_TYPE check case-insensitive Juergen pointed out that this variable is treated in a case insensitive way. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244516 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index adf852e2a44..3d753afbeee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,11 +7,6 @@ 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() @@ -157,6 +152,10 @@ 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.