Skip to content
Snippets Groups Projects
Commit b0fdfd52 authored by Pascal Palenda's avatar Pascal Palenda
Browse files

Merge branch 'feature/CPM-version-bump' into 'main'

Feat: bump CPM version

See merge request !4
parents 640eaca7 308e9423
No related branches found
No related tags found
1 merge request!4Feat: bump CPM version
......@@ -5,10 +5,15 @@ include_guard ()
include (${CMAKE_CURRENT_LIST_DIR}/InitProject.cmake)
# Check for CPM
# set (CPM_DOWNLOAD_VERSION 0.40.5)
set(CPM_DOWNLOAD_VERSION 0.40.5)
file (GLOB CPM_MODULE_LOCATIONS ${CMAKE_BINARY_DIR}/cmake/CPM*.cmake)
if (NOT CPM_MODULE_LOCATIONS)
set (CPM_DOWNLOAD_VERSION 0.37.0)
# get the version from the last element in the list
list (GET CPM_MODULE_LOCATIONS -1 CPM_MODULE_LOCATION)
string (REGEX REPLACE ".*CPM_([0-9]+\\.[0-9]+\\.[0-9]+)\\.cmake" "\\1" CPM_MODULE_VERSION ${CPM_MODULE_LOCATION})
if (NOT CPM_MODULE_LOCATIONS OR CPM_MODULE_VERSION VERSION_LESS CPM_DOWNLOAD_VERSION)
set (CPM_MODULE_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
message (STATUS "Downloading CPM.cmake")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment