don't change the build type, fatal error if bad build type

This commit is contained in:
Benoit Jacob 2010-10-21 08:55:48 -04:00
parent 969518f99d
commit bfd46eacad

View File

@ -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)