Skip to content

Commit a0fd94b

Browse files
committed
Add CPM local cache support
1 parent 7b883f0 commit a0fd94b

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,16 @@ Makefile
2424

2525
# CPM cache (optional - can be shared across projects)
2626
_deps/
27+
.cpm-cache/
2728

2829
# IDE and editor files
2930
.idea/
3031
.vscode/
3132
.vs/
3233
.devcontainer/
3334
compile_commands.json
34-
DartConfiguration.tcl
35-
**/*.cbp
35+
.clangd/
36+
.cache/
3637
tags
3738

3839
# macOS

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ project(developer_joyofenergy_cpp)
33

44
set(CMAKE_CXX_STANDARD 17)
55

6+
# Set CPM cache directory to avoid re-downloading dependencies
7+
# Can be overridden by environment variable CPM_SOURCE_CACHE
8+
if(NOT CPM_SOURCE_CACHE)
9+
set(CPM_SOURCE_CACHE "${CMAKE_SOURCE_DIR}/.cpm-cache" CACHE PATH "CPM cache directory")
10+
endif()
11+
612
# Include CPM package manager
713
include(cmake/CPM.cmake)
814

0 commit comments

Comments
 (0)