]>
Commit | Line | Data |
---|---|---|
999f4f75 | 1 | # Set a default build type if none was specified. |
f2341b2b | 2 | |
999f4f75 JR |
3 | if(CMAKE_BUILD_TYPE OR CMAKE_CONFIGURATION_TYPES) |
4 | return() | |
5 | endif() | |
f2341b2b | 6 | |
999f4f75 JR |
7 | # Default to Release for end user builds (from source archive) and Debug for |
8 | # development builds (in a Git repository). | |
533393e6 | 9 | if(CCACHE_DEV_MODE) |
999f4f75 JR |
10 | set( |
11 | CMAKE_BUILD_TYPE "Debug" | |
12 | CACHE STRING "Choose the type of build." FORCE) | |
13 | else() | |
14 | set( | |
15 | CMAKE_BUILD_TYPE "Release" | |
16 | CACHE STRING "Choose the type of build." FORCE) | |
f2341b2b | 17 | endif() |
999f4f75 JR |
18 | message( |
19 | STATUS | |
20 | "Setting CMAKE_BUILD_TYPE to ${CMAKE_BUILD_TYPE} as none was specified." | |
21 | ) | |
22 | ||
23 | # Set the possible values of build type for CMake UIs. | |
24 | set_property( | |
25 | CACHE CMAKE_BUILD_TYPE | |
26 | PROPERTY | |
27 | STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo") |