mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
Merge topic 'FetchContent-unparsed-arguments'
9ede4cab2b FetchContent: Protect ExternalProject keywords from unknown arguments
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Craig Scott <craig.scott@crascit.com>
Merge-request: !8598
This commit is contained in:
@@ -4266,6 +4266,10 @@ function(ExternalProject_Add name)
|
||||
# Miscellaneous options
|
||||
#
|
||||
LIST_SEPARATOR
|
||||
#
|
||||
# Internal options (undocumented)
|
||||
#
|
||||
EXTERNALPROJECT_INTERNAL_ARGUMENT_SEPARATOR
|
||||
)
|
||||
_ep_parse_arguments(
|
||||
ExternalProject_Add
|
||||
|
||||
@@ -1336,9 +1336,11 @@ function(FetchContent_Declare contentName)
|
||||
endif()
|
||||
|
||||
# Add back in the keyword args we pulled out and potentially tweaked/added
|
||||
set(sep EXTERNALPROJECT_INTERNAL_ARGUMENT_SEPARATOR)
|
||||
foreach(key IN LISTS oneValueArgs)
|
||||
if(DEFINED ARG_${key})
|
||||
list(PREPEND ARG_UNPARSED_ARGUMENTS ${key} "${ARG_${key}}")
|
||||
list(PREPEND ARG_UNPARSED_ARGUMENTS ${key} "${ARG_${key}}" ${sep})
|
||||
set(sep "")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user