From 11dee4e238f5041ae640e9dddca17c0335a84892 Mon Sep 17 00:00:00 2001 From: Johan Rehnberg Date: Sat, 27 Jun 2015 10:52:10 +0200 Subject: [PATCH] use case-insensitive match when setting DEBUG_BUILD fixes #4840 --- CMakeLists.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f4fd7e453f..95f08db7143 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,11 +41,12 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") endif() # set some internal vars -If ("${CMAKE_BUILD_TYPE}" MATCHES "^DEBUG") - Set(DEBUG_BUILD TRUE) -Else ("${CMAKE_BUILD_TYPE}" MATCHES "^DEBUG") - Set(DEBUG_BUILD FALSE) -EndIf ("${CMAKE_BUILD_TYPE}" MATCHES "^DEBUG") +string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UPPER) +if("${CMAKE_BUILD_TYPE_UPPER}" MATCHES "^DEBUG") + set(DEBUG_BUILD TRUE) +else() + set(DEBUG_BUILD FALSE) +endif() if(NOT "${CMAKE_C_FLAGS}" STREQUAL "")