File: BTUseCcache.cmake

package info (click to toggle)
bibletime 3.0-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 14,556 kB
  • sloc: cpp: 33,506; sh: 135; ansic: 86; xml: 43; makefile: 13
file content (18 lines) | stat: -rw-r--r-- 750 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
SET(USE_CCACHE "OFF" CACHE BOOL "Use ccache for building")
SET(CCACHE_EXECUTABLE "" CACHE FILEPATH
    "Path to the ccache executable to use when USE_CCACHE is set")

IF(USE_CCACHE)
    IF(CCACHE_EXECUTABLE STREQUAL "")
        UNSET(CCACHE_EXECUTABLE CACHE)
        FIND_PROGRAM(CCACHE_EXECUTABLE "ccache")
        IF(NOT CCACHE_EXECUTABLE)
            MESSAGE(FATAL_ERROR "USE_CCACHE set, but ccache was not found!")
        ENDIF()
        MESSAGE(STATUS "Using ccache (detected): ${CCACHE_EXECUTABLE}")
    ELSE()
        MESSAGE(STATUS "Using ccache: ${CCACHE_EXECUTABLE}")
    ENDIF()
    SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_EXECUTABLE}")
    SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CCACHE_EXECUTABLE}")
ENDIF()