Skip to content

Commit 5029b92

Browse files
committed
Fix setting default CPM source cache directory
CPM kept overriding this with the helpful value `"OFF"`. No more, CPM, no more. Signed-off-by: Till Schneidereit <till@tillschneidereit.net>
1 parent 1eef11f commit 5029b92

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ endif()
2121
message(STATUS "Using host API: ${HOST_API}")
2222

2323
# Ensure that the CPM cache is created outside the build dir, even if no location is specified by the developer.
24-
if(NOT DEFINED ENV{CPM_SOURCE_CACHE} AND NOT DEFINED CPM_SOURCE_CACHE)
25-
set(CPM_SOURCE_CACHE ${CMAKE_CURRENT_SOURCE_DIR}/deps/cpm_cache)
24+
if(NOT DEFINED ENV{CPM_SOURCE_CACHE})
25+
set(ENV{CPM_SOURCE_CACHE} ${CMAKE_CURRENT_SOURCE_DIR}/deps/cpm_cache)
2626
endif()
2727
include("CPM")
2828
include("toolchain")

0 commit comments

Comments
 (0)