diff --git a/CMakeLists.txt b/CMakeLists.txt index 7da8f1bca43..2b97a1b8d02 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,6 +52,12 @@ option(BUILD_PYTHON "Build python binaries" ON) # options that do not affect the main binaries, but affects testing binaries option(BUILD_TEST "Build C++ test binaries (need gtest and gbenchmark)" ON) +# Set default build type +if(NOT CMAKE_BUILD_TYPE) + message(STATUS "Build type not set - defaulting to Release") + set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build from: Debug Release RelWithDebInfo MinSizeRel Coverage." FORCE) +endif() + # ---[ Dependencies include(cmake/Dependencies.cmake)