summaryrefslogtreecommitdiffstats
path: root/CMakeModules/MSVCCache.cmake
blob: 8848e35ead42adbda827d2143647e0bfad3d4d32 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
# buildcache wrapper
OPTION(USE_CCACHE "Use buildcache for compilation" OFF)
IF(USE_CCACHE)
    FIND_PROGRAM(CCACHE buildcache)
    IF (CCACHE)
        MESSAGE(STATUS "Using buildcache found in PATH")
        SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE})
        SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE})
    ELSE(CCACHE)
        MESSAGE(WARNING "USE_CCACHE enabled, but no buildcache executable found")
    ENDIF(CCACHE)
ENDIF(USE_CCACHE)