From 8170fd0b6f01f7163d5752c614f171d69ef490c7 Mon Sep 17 00:00:00 2001 From: Radovan Bast Date: Thu, 4 Jun 2015 17:49:23 +0200 Subject: [PATCH] if build type not set, set to debug --- modules/safe_guards.cmake | 4 ---- update.py | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/safe_guards.cmake b/modules/safe_guards.cmake index f8c9098..bf6688d 100644 --- a/modules/safe_guards.cmake +++ b/modules/safe_guards.cmake @@ -15,9 +15,5 @@ function(guard_against_bad_build_types in_build_type) endif() endfunction() -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Debug") -endif() - guard_against_in_source(${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR}) guard_against_bad_build_types(${CMAKE_BUILD_TYPE}) diff --git a/update.py b/update.py index 9142c30..012e090 100755 --- a/update.py +++ b/update.py @@ -166,6 +166,11 @@ def gen_cmakelists(config, relative_path, list_of_modules): s.append('# do not rebuild if rules (compiler flags) change') s.append('set(CMAKE_SKIP_RULE_DEPENDENCY TRUE)') + s.append('\n') + s.append('if(NOT CMAKE_BUILD_TYPE)') + s.append(' set(CMAKE_BUILD_TYPE "Debug")') + s.append('endif()') + s.append('\n') s.append('# python interpreter is required at many') s.append('# places during configuration and build')