aboutsummaryrefslogtreecommitdiff
path: root/etc/build_type.cmake
blob: 69d019fa2b957896e68b91cd567f18dd20750c00 (plain)
1
2
3
4
5
6
7
8
9
10
11
set(default_build_type "Debug")

if (NOT (CMAKE_BUILD_TYPE_SHADOW STREQUAL CMAKE_BUILD_TYPE))
    if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
        message (STATUS "Setting build type to '${default_build_type}'")
        set (CMAKE_BUILD_TYPE "${default_build_type}" CACHE STRING "Choose the type of build." FORCE)
    endif ()
    set (CMAKE_BUILD_TYPE_SHADOW ${CMAKE_BUILD_TYPE} CACHE STRING "used to detect changes in build type" FORCE)
endif ()

message (STATUS "Building in '${CMAKE_BUILD_TYPE}' mode.")