Can I ask a related question? It looks like -D options are not allowed in workflow presets either. Is that intended or am I missing something how to pass the option?
For example, in a project with an option like this:
# CMakeLists.txt
...
set(PYBIND_VERSION "v2.13.6" CACHE STRING "the Git tag for pybind11")
The configuration preset works fine:
$ cmake --preset pybind --fresh -DPYBIND_VERSION=v2.11.0
Preset CMake variables:
...
-- The C compiler identification is GNU 13.1.0
...
-- pybind11 bindings (pybind version v2.11.0)
...
But workflow (that performs the configuration and a build step) does not accept the option:
$ cmake --workflow --preset build_pybind -DPYBIND_VERSION=v2.11.0
Unknown argument -DPYBIND_VERSION=v2.11.0
...
It is CMake version 3.26.2.