CMake/ccache.cmake

23 lines
660 B
CMake
Raw Normal View History

2019-08-31 18:18:50 +03:00
#
2020-12-17 18:11:22 +03:00
# Copyright (C) 2018-2021 QuasarApp.
2019-08-31 18:18:50 +03:00
# Distributed under the MIT software license, see the accompanying
# Everyone is permitted to copy and distribute verbatim copies
# of this license document, but changing it is not allowed.
#
2021-03-19 21:37:14 +03:00
# This module adds support of the ccache.
# If you include this cmake file in the main cmakList file then your project will be use the ccace on to the compilator
if(DEFINED CCACHE_SUPPORT)
return()
else()
set(CCACHE_SUPPORT 1)
endif()
2019-08-31 18:18:50 +03:00
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
message("using ccache in ${CCACHE_PROGRAM}")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
endif()