diff --git a/CMakeLists.txt b/CMakeLists.txt index 9eb8d96e..09f792eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,16 @@ include(${ROOT_USE_FILE}) include(GoogleBenchmark) +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(default_build_type "Release") + message(STATUS "Setting build type to '${default_build_type}' as none was specified.") + set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE + STRING "Choose the type of build." FORCE) + # Set the possible values of build type for cmake-gui + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Release" "MinSizeRel" "RelWithDebInfo") +endif() + #---Add ROOT include direcories and used compilation flags include_directories(${ROOT_INCLUDE_DIRS}) add_definitions(${ROOT_CXX_FLAGS})