blob: cfe7f91aed74eab8359a39afcdbacc797907c1b3 [file] [log] [blame]
Anas Nashif3ae52622019-04-06 09:08:09 -04001# SPDX-License-Identifier: Apache-2.0
2
Sebastian Bøe12f8f762017-10-27 15:43:34 +02003# Use ccache if it is installed, unless the user explicitly disables
4# it by setting USE_CCACHE=0.
5
6if(USE_CCACHE STREQUAL "0")
7else()
8 find_program(CCACHE_FOUND ccache)
9 if(CCACHE_FOUND)
10 set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
11 set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
12 endif()
13endif()