aboutsummaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-10-21 08:55:48 -0400
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-10-21 08:55:48 -0400
commitbfd46eacad8db3967c0c6ed51f3562fc27fe5a43 (patch)
treeddd8edbf26decba42051d6f324759730ed506214 /CMakeLists.txt
parent969518f99d82e2ca62b20b4e45a719b7e267bc6d (diff)
don't change the build type, fatal error if bad build type
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
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)