if build type not set, set to debug

This commit is contained in:
Radovan Bast 2015-06-04 17:49:23 +02:00
parent 49f69b854c
commit 8170fd0b6f
2 changed files with 5 additions and 4 deletions

View File

@ -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})

View File

@ -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')