From 9ad238358b529ee53e11fc4e5d08792c11cb229c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Marc=C3=A8=20i=20Igual?= Date: Tue, 8 Mar 2022 12:12:46 +0100 Subject: [PATCH] chore: set default build type as Release --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 68b48b6..9e420e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,14 @@ set(MAJOR 1) set(MINOR 6) set(PATCH 0) +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() + aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/src ALL_SRC) aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/src/internal ALL_SRC)