diff --git a/CMakeLists.txt b/CMakeLists.txt index 0412ecf9b61bfe9a364e0e14514be31019a1b2fd..c4d88f1869de228cc78670820d28b7e6b5890b29 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,7 +49,11 @@ if (NOT is_multi_config) CACHE STRING "Choose the type of build." FORCE ) elseif (NOT CMAKE_BUILD_TYPE IN_LIST allowed_build_types) - message(FATAL_ERROR "Unknown build type: ${CMAKE_BUILD_TYPE}") + message(WARNING "Unknown build type '${CMAKE_BUILD_TYPE}'. " + "Defaulting to '${default_build_type}'") + set(CMAKE_BUILD_TYPE "${default_build_type}" + CACHE STRING "Choose the type of build." FORCE + ) endif () endif ()