diff --git a/CMakeLists.txt b/CMakeLists.txt index 2856327..84cdec6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -175,6 +175,13 @@ include(cmake/CPM.cmake) # excluded from the generated target lists for the various tools. set(FETCHCONTENT_BASE_DIR ${CMAKE_BINARY_DIR}/third_party_deps) +# ---- Speedup build using ccache ---- +# see https://github.com/TheLartians/Ccache.cmake enables CCACHE support through +# the USE_CCACHE flag possible values are: YES, NO or equivalent +if(USE_CCACHE) + cpmaddpackage("gh:TheLartians/Ccache.cmake@1.2.3") +endif() + # ------------------------------------------------------------------------------ # Testing # ------------------------------------------------------------------------------ diff --git a/CMakePresets.json b/CMakePresets.json index 6561df8..38a67d6 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -19,6 +19,7 @@ "caexcludepath": "${sourceDir}/third_party;${sourceDir}/out" }, "cacheVariables": { + "USE_CCACHE": "ON", "ASAP_BUILD_TESTS": "ON", "ASAP_BUILD_EXAMPLES": "ON" }