From e5fba1d881c7de0b16ddf8fd662edb9699cc8b44 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 20 Nov 2013 16:36:11 +0100 Subject: [PATCH] Set default build type to RelWithDebInfo. Fixes #5112 --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ccb4c77d..0b3f8e632 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,12 @@ cmake_minimum_required(VERSION 2.6) project(icinga2) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING + "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." + FORCE) +endif() + file(STRINGS icinga2.spec VERSION_LINE REGEX "^Version: ") string(REPLACE "Version: " "" ICINGA2_VERSION ${VERSION_LINE})