Skip to content

Commit 44da292

Browse files
committed
Activate ccache for CMake
1 parent 014dbce commit 44da292

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,9 @@ env:
2626

2727
cache:
2828
pip: true
29+
ccache: true
2930
directories:
3031
- ${HOME}/.cache/deps
31-
- ${HOME}/.ccache
32-
3332

3433
before_install:
3534
- source tools/test/travis-ci/functions.sh

tools/cmake/app.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4+
find_program(CCACHE "ccache")
5+
if(CCACHE)
6+
set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE})
7+
set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE})
8+
endif()
9+
410
include(${MBED_CONFIG_PATH}/mbed_config.cmake)
511

612
# Set default toolchain file

0 commit comments

Comments
 (0)