File: DefaultBuildType.cmake

package info (click to toggle)
ccache 4.12.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,188 kB
  • sloc: cpp: 47,282; asm: 28,570; sh: 8,674; ansic: 5,357; python: 685; perl: 68; makefile: 23
file content (27 lines) | stat: -rw-r--r-- 714 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Set a default build type if none was specified.

if(CMAKE_BUILD_TYPE OR CMAKE_CONFIGURATION_TYPES)
  return()
endif()

# Default to Release for end user builds (from source archive) and Debug for
# development builds (in a Git repository).
if(CCACHE_DEV_MODE)
  set(
    CMAKE_BUILD_TYPE "Debug"
    CACHE STRING "Choose the type of build." FORCE)
else()
  set(
    CMAKE_BUILD_TYPE "Release"
    CACHE STRING "Choose the type of build." FORCE)
endif()
message(
  STATUS
  "Setting CMAKE_BUILD_TYPE to ${CMAKE_BUILD_TYPE} as none was specified"
)

# Set the possible values of build type for CMake UIs.
set_property(
  CACHE CMAKE_BUILD_TYPE
  PROPERTY
  STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")