cmake: Allow arbitrary args passed to CMake script

This commit is contained in:
Alex Turbov
2020-05-04 23:08:40 +08:00
committed by Craig Scott
parent e177e7dbec
commit e4f1b301fe
4 changed files with 16 additions and 2 deletions
+5 -1
View File
@@ -481,13 +481,17 @@ Run a Script
.. code-block:: shell
cmake [{-D <var>=<value>}...] -P <cmake-script-file>
cmake [{-D <var>=<value>}...] -P <cmake-script-file> [-- <unparsed-options>...]
Process the given cmake file as a script written in the CMake
language. No configure or generate step is performed and the cache
is not modified. If variables are defined using ``-D``, this must be
done before the ``-P`` argument.
Any options after ``--`` are not parsed by CMake, but they are still included
in the set of :variable:`CMAKE_ARGV<n> <CMAKE_ARGV0>` variables passed to the
script (including the ``--`` itself).
Run a Command-Line Tool
=======================