From bfd46eacad8db3967c0c6ed51f3562fc27fe5a43 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Thu, 21 Oct 2010 08:55:48 -0400 Subject: [PATCH] don't change the build type, fatal error if bad build type --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 869a78240..f60dbd8fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,8 +84,12 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_tolower) if(cmake_build_type_tolower STREQUAL "debug") set(CMAKE_BUILD_TYPE "Debug") -else() +elseif(cmake_build_type_tolower STREQUAL "release") set(CMAKE_BUILD_TYPE "Release") +elseif(cmake_build_type_tolower STREQUAL "relwithdebinfo") + set(CMAKE_BUILD_TYPE "RelWithDebInfo") +else() + message(FATAL_ERROR "Unknown build type ${CMAKE_BUILD_TYPE}") endif() string(TOLOWER "${CMAKE_GENERATOR}" cmake_generator_tolower)