From 135738bb6b321673b850af8e7d902a6b6460885c Mon Sep 17 00:00:00 2001 From: Curve Date: Sat, 13 Jul 2024 19:14:52 +0200 Subject: [PATCH] fux(cpm): properly forward options This a quick hack, progress is tracked here: https://github.com/cpm-cmake/CPM.cmake/pull/570 I'm using a patched version of upstream for the time being --- cmake/cpm.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmake/cpm.cmake b/cmake/cpm.cmake index 558a76b..30cceed 100644 --- a/cmake/cpm.cmake +++ b/cmake/cpm.cmake @@ -873,6 +873,14 @@ function(CPMAddPackage) if(${CPM_ARGS_SYSTEM}) list(APPEND fetchContentDeclareExtraArgs SYSTEM) endif() + + if(CPM_ARGS_OPTIONS) + foreach(OPTION ${CPM_ARGS_OPTIONS}) + cpm_parse_option("${OPTION}") + set(${OPTION_KEY} "${OPTION_VALUE}") + endforeach() + endif() + cpm_declare_fetch( "${CPM_ARGS_NAME}" ${fetchContentDeclareExtraArgs}