diff options
Diffstat (limited to 'cmake/cmake.d/01-build_options.cmake')
-rw-r--r-- | cmake/cmake.d/01-build_options.cmake | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cmake/cmake.d/01-build_options.cmake b/cmake/cmake.d/01-build_options.cmake index 36830f1..18aff71 100644 --- a/cmake/cmake.d/01-build_options.cmake +++ b/cmake/cmake.d/01-build_options.cmake @@ -32,7 +32,14 @@ INCLUDE(CheckIncludeFiles) INCLUDE(CheckLibraryExists) INCLUDE(GNUInstallDirs) -set(CMAKE_BUILD_TYPE Debug CACHE STRING "the type of build") +if(NOT CMAKE_BUILD_TYPE) + if(BUILD_TYPE) + set(CMAKE_BUILD_TYPE ${BUILD_TYPE} CACHE STRING "the type of build" FORCE) + else() + set(CMAKE_BUILD_TYPE DEBUG CACHE STRING "the type of build" FORCE) + endif() +endif() + set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMP0048 1) |