This repository was archived by the owner on Mar 22, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ option(CHECK_CPP_STYLE "check code style of C++ sources" OFF)
5050option (TRACE_TESTS "more verbose test outputs" OFF )
5151option (USE_ASAN "enable AddressSanitizer (debugging)" OFF )
5252option (USE_UBSAN "enable UndefinedBehaviorSanitizer (debugging)" OFF )
53+ option (USE_CCACHE "Use ccache if it is available in the system" ON )
5354
5455option (TESTS_USE_FORCED_PMEM "run tests with PMEM_IS_PMEM_FORCE=1" OFF )
5556option (TESTS_USE_VALGRIND "enable tests with valgrind (if found)" ON )
@@ -81,6 +82,12 @@ option(INSTALL_CONCURRENT_MAP "enable installation of pmem::obj::experimental::c
8182option (INSTALL_SELF_RELATIVE_POINTER "enable installation of pmem::obj::experimental::self_relative_ptr" ON )
8283option (INSTALL_RADIX_TREE "enable testing of pmem::obj::experimental::radix_tree" ON )
8384
85+ # Configure the ccache as compiler launcher
86+ find_program (CCACHE_FOUND ccache )
87+ if (USE_CCACHE AND CCACHE_FOUND)
88+ set_property (GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache )
89+ endif ()
90+
8491# Do not treat include directories from the interfaces
8592# of consumed Imported Targets as SYSTEM by default.
8693set (CMAKE_NO_SYSTEM_FROM_IMPORTED 1)
You can’t perform that action at this time.
0 commit comments