mirror of
https://github.com/apache/nuttx.git
synced 2026-02-06 04:01:54 +08:00
cmake: Add support for ccache.
Enable ccache in CMake if CONFIG_CCACHE is set Signed-off-by: Søren Friis <sfriis@gmail.com>
This commit is contained in:
@@ -426,6 +426,18 @@ if(CONFIG_ARCH_BOARD_COMMON)
|
||||
"${NUTTX_DIR}/boards/${CONFIG_ARCH}/${CONFIG_ARCH_CHIP}/common")
|
||||
endif()
|
||||
|
||||
# Setup ccache ###############################################################
|
||||
|
||||
if(CONFIG_CCACHE)
|
||||
find_program(CCACHE_PROGRAM ccache)
|
||||
if(CCACHE_PROGRAM)
|
||||
message(STATUS "Using ccache: ${CCACHE_PROGRAM}")
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
|
||||
else()
|
||||
message(STATUS "Could not find ccache, skipping!")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Setup toolchain ############################################################
|
||||
|
||||
# This needs to happen before project() when binaries are searched for
|
||||
|
||||
Reference in New Issue
Block a user