From 74a82e20385846ef673aa66fcf63f31e44491e0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20A=2E=20Ortega?= Date: Thu, 16 Mar 2017 14:59:26 +0100 Subject: [PATCH] Case insensitive. --- CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ac0fa56..d58f40e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,8 +22,10 @@ cmake_policy(SET CMP0012 OLD) set(TARGET_NAME indivisible) if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE Debug) + set(CMAKE_BUILD_TYPE "debug") endif() +string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE) +message(STATUS "Build type: ${CMAKE_BUILD_TYPE}") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} @@ -47,8 +49,8 @@ set(CMAKE_C_FLAGS_RELEASE "-O3") set(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -O3") set(CMAKE_C_FLAGS_MINSIZEREL "-Os") -if(NOT CMAKE_BUILD_TYPE MATCHES Debug AND NOT CMAKE_BUILD_TYPE MATCHES RelWithDebInfo) - add_definitions(-DNDEBUG) +if(NOT CMAKE_BUILD_TYPE MATCHES "debug" AND NOT CMAKE_BUILD_TYPE MATCHES "relwithdebinfo") + add_definitions("-DNDEBUG") endif() add_executable(${TARGET_NAME} ${SRCS})