Use 'Release' as default when build type is not specified.

Otherwise, "cmake /path/to/eigen/" in an empty build directory, as specified
on the CMake page on the wiki, yields a fatal error.
This commit is contained in:
Jitse Niesen 2010-10-22 12:23:35 +01:00
parent bfd46eacad
commit dbdf7ee942

View File

@ -88,6 +88,9 @@ elseif(cmake_build_type_tolower STREQUAL "release")
set(CMAKE_BUILD_TYPE "Release")
elseif(cmake_build_type_tolower STREQUAL "relwithdebinfo")
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
elseif(cmake_build_type_tolower STREQUAL "")
# Use 'Release' as default when build type is not specified
set(CMAKE_BUILD_TYPE "Release")
else()
message(FATAL_ERROR "Unknown build type ${CMAKE_BUILD_TYPE}")
endif()