Skip to content

Commit e009136

Browse files
committed
circumvent bug in cmake <3.30
1 parent 0bc73f4 commit e009136

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmake/CPM.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ function(CPMAddPackage)
870870
# add_subdirectory. Up until these changes, we had to call FetchContent_Populate and
871871
# add_subdirectory separately, which is no longer necessary and has been deprecated as of 3.30.
872872
set(fetchContentDeclareExtraArgs "")
873-
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.28.0")
873+
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.30.0")
874874
if(${CPM_ARGS_EXCLUDE_FROM_ALL})
875875
list(APPEND fetchContentDeclareExtraArgs EXCLUDE_FROM_ALL)
876876
endif()
@@ -896,7 +896,7 @@ function(CPMAddPackage)
896896
if(CPM_SOURCE_CACHE AND download_directory)
897897
file(LOCK ${download_directory}/../cmake.lock RELEASE)
898898
endif()
899-
if(${populated} AND ${CMAKE_VERSION} VERSION_LESS "3.28.0")
899+
if(${populated} AND ${CMAKE_VERSION} VERSION_LESS "3.30.0")
900900
cpm_add_subdirectory(
901901
"${CPM_ARGS_NAME}"
902902
"${DOWNLOAD_ONLY}"
@@ -1098,7 +1098,7 @@ function(cpm_fetch_package PACKAGE DOWNLOAD_ONLY populated)
10981098
string(TOLOWER "${PACKAGE}" lower_case_name)
10991099

11001100
if(NOT ${lower_case_name}_POPULATED)
1101-
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.28.0")
1101+
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.30.0")
11021102
if(DOWNLOAD_ONLY)
11031103
# MakeAvailable will call add_subdirectory internally which is not what we want when
11041104
# DOWNLOAD_ONLY is set. Populate will only download the dependency without adding it to the

0 commit comments

Comments
 (0)