aboutsummaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2011-01-19 10:15:36 -0500
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2011-01-19 10:15:36 -0500
commitbf0cffa897fc7b9d40c92bb5f075ebdd682d83b6 (patch)
tree1b0f51fa0698ebef6cf766253c3c6e72ce671500 /CMakeLists.txt
parent1f6bd2915d73b414d5e5baf109d7be3e8045a7b7 (diff)
restore the behavior of defaulting to Release build type
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 6 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b2d19524b..64655853d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,12 +10,15 @@ endif()
# guard against bad build-type strings
+if (NOT CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE "Release")
+endif()
+
string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_tolower)
if( NOT cmake_build_type_tolower STREQUAL "debug"
AND NOT cmake_build_type_tolower STREQUAL "release"
- AND NOT cmake_build_type_tolower STREQUAL "relwithdebinfo"
- AND NOT cmake_build_type_tolower STREQUAL "")
- message(FATAL_ERROR "Unknown build type \"${CMAKE_BUILD_TYPE}\". Allowed values are Debug, Release, RelWithDebInfo and \"\" (case-insensitive).")
+ AND NOT cmake_build_type_tolower STREQUAL "relwithdebinfo")
+ message(FATAL_ERROR "Unknown build type \"${CMAKE_BUILD_TYPE}\". Allowed values are Debug, Release, RelWithDebInfo (case-insensitive).")
endif()