Răsfoiți Sursa

Merge topic 'FetchContent-find_package-args'

42dbdf8914 FetchContent: Fix syntax to forward FIND_PACKAGE_ARGS arguments correctly

Acked-by: Kitware Robot <[email protected]>
Acked-by: buildbot <[email protected]>
Merge-request: !8967
Brad King 2 ani în urmă
părinte
comite
25fcc7e3de
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      Modules/FetchContent.cmake

+ 2 - 2
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})"