cpm-cmake / CPM.cmake

📦 CMake's missing package manager. A small CMake script for setup-free, cross-platform, reproducible dependency management.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot pass `GIT_SUBMODULES ""` to disable submodule updates

CraigHutchinson opened this issue · comments

This is due to using UNPARSED_ARGUMENTS is being used internally which removes empty values erroneously!
https://gitlab.kitware.com/cmake/cmake/-/issues/24578

NOTE: need to check if the 'internal' issue on FetchContent>ExternalProject changes can be applied to CPM as a fix: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4729/diffs

Most notably this change to use a potentially 'compatible' variant of cmake_parse_arguments using PARSE_ARGV TBC:

- cmake_parse_arguments(ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+  cmake_parse_arguments(PARSE_ARGV 1 ARG
+   "${options}" "${oneValueArgs}" "${multiValueArgs}")

Validated the approach. It does work so will resolve the issue when Cmake >= 3.7 but as CPM is seting minimum at 3.14 this is fine :)
image