Skip to content

Commit

Permalink
refactor: use ccache to speedup builds
Browse files Browse the repository at this point in the history
  • Loading branch information
abdes committed Mar 15, 2022
1 parent 8c12b88 commit 38282f4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]")
endif()

# ------------------------------------------------------------------------------
# Testing
# ------------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"caexcludepath": "${sourceDir}/third_party;${sourceDir}/out"
},
"cacheVariables": {
"USE_CCACHE": "ON",
"ASAP_BUILD_TESTS": "ON",
"ASAP_BUILD_EXAMPLES": "ON"
}
Expand Down

0 comments on commit 38282f4

Please sign in to comment.