summaryrefslogtreecommitdiffstats
path: root/Modules/FetchContent.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-11-17 13:19:20 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-11-17 13:19:35 (GMT)
commit25fcc7e3de703de75a9d0bbca1d9bc910b05deaa (patch)
tree658a1b134df08676e45ded9d522e666ae3a30383 /Modules/FetchContent.cmake
parent194d66c95232c096a5f18e678d38620da75a4af9 (diff)
parent42dbdf8914585236453f7873f6a0170ba451b944 (diff)
downloadCMake-25fcc7e3de703de75a9d0bbca1d9bc910b05deaa.zip
CMake-25fcc7e3de703de75a9d0bbca1d9bc910b05deaa.tar.gz
CMake-25fcc7e3de703de75a9d0bbca1d9bc910b05deaa.tar.bz2
Merge topic 'FetchContent-find_package-args'
42dbdf8914 FetchContent: Fix syntax to forward FIND_PACKAGE_ARGS arguments correctly Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8967
Diffstat (limited to 'Modules/FetchContent.cmake')
-rw-r--r--Modules/FetchContent.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/FetchContent.cmake b/Modules/FetchContent.cmake
index b6c8bad..8663631 100644
--- a/Modules/FetchContent.cmake
+++ b/Modules/FetchContent.cmake
@@ -1204,10 +1204,10 @@ function(__FetchContent_declareDetails contentName)
set(propertyName "_FetchContent_${contentNameLower}_find_package_args")
define_property(GLOBAL PROPERTY ${propertyName})
if(NOT __sawQuietKeyword)
- list(INSERT __findPackageArgs 0 QUIET)
+ string(PREPEND __findPackageArgs "QUIET ")
endif()
if(CMAKE_FIND_PACKAGE_TARGETS_GLOBAL AND NOT __sawGlobalKeyword)
- list(APPEND __findPackageArgs GLOBAL)
+ string(APPEND __findPackageArgs " GLOBAL")
endif()
cmake_language(EVAL CODE
"set_property(GLOBAL PROPERTY ${propertyName} ${__findPackageArgs})"