Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion cmake/CPM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,12 @@ set(CPM_DRY_RUN
CACHE INTERNAL "Don't download or configure dependencies (for testing)"
)

# ENV gets top priority to control CPM_SOURCE_CACHE location
# If it is not defined, allow user to control the location with CPM_SOURCE_CACHE_DEFAULT
# If neither are set disable CPM_SOURCE_CACHE
if(DEFINED ENV{CPM_SOURCE_CACHE})
set(CPM_SOURCE_CACHE_DEFAULT $ENV{CPM_SOURCE_CACHE})
else()
elseif(NOT DEFINED CPM_SOURCE_CACHE_DEFAULT)
set(CPM_SOURCE_CACHE_DEFAULT OFF)
endif()

Expand Down