From 4b85141f8373f24ecace6d12afaaa56adf60273c Mon Sep 17 00:00:00 2001 From: Craig Scott Date: Fri, 2 Dec 2022 15:19:48 +1100 Subject: FetchContent: Don't pass SYSTEM through to sub-build If we don't filter out SYSTEM from the arguments we pass through to ExternalProject_Add(), it gets appended as a list item to whatever arguments precede it because ExternalProject_Add() doesn't recognize it as a keyword. Fixes: #24201 --- Modules/FetchContent.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Modules/FetchContent.cmake b/Modules/FetchContent.cmake index ac3918c..25b0683 100644 --- a/Modules/FetchContent.cmake +++ b/Modules/FetchContent.cmake @@ -1427,6 +1427,9 @@ function(__FetchContent_directPopulate contentName) set(options QUIET + # SYSTEM has no meaning for ExternalProject, it is only used by us in + # FetchContent_MakeAvailable(). We need to parse and discard it here. + SYSTEM ) set(oneValueArgs SUBBUILD_DIR -- cgit v0.12