cmake/tribits/core/utils/UseCcacheIfExists.cmake
raw| 1 | # Include this file in your CMake project with either -C |
| 2 | # UseCcacheIfExists.cmake or with the TriBITS option -D |
| 3 | # <Project>_CONFIGURE_OPTIONS_FILE=UseCcacheIfExists.cmake. |
| 4 | |
| 5 | find_program(CCACHE_EXEC ccache) |
| 6 | if (CCACHE_EXEC) |
| 7 | message("-- NOTE: ccache program exists so using it for RULE_LAUNCH_COMPILE!") |
| 8 | set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_EXEC}") |
| 9 | endif() |