diff options
author | Adam Ć ulc <sulcadam12@gmail.com> | 2023-11-13 09:01:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-11-15 13:22:19 (GMT) |
commit | 42dbdf8914585236453f7873f6a0170ba451b944 (patch) | |
tree | 1b509badcca59c12efe860ea944950e2d48c21f1 /Modules | |
parent | 1af14eda2d91e60b240487a9d3318139d336c177 (diff) | |
download | CMake-42dbdf8914585236453f7873f6a0170ba451b944.zip CMake-42dbdf8914585236453f7873f6a0170ba451b944.tar.gz CMake-42dbdf8914585236453f7873f6a0170ba451b944.tar.bz2 |
FetchContent: Fix syntax to forward FIND_PACKAGE_ARGS arguments correctly
Previously we incorrectly mixed list operations with string operations.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FetchContent.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/FetchContent.cmake b/Modules/FetchContent.cmake index ad5a6f1..e53ab3b 100644 --- a/Modules/FetchContent.cmake +++ b/Modules/FetchContent.cmake @@ -1194,10 +1194,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})" |