summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2024-03-27 10:43:15 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2024-03-28 14:36:31 (GMT)
commit611ffce98c731be0b86b25a2ff415190810546a0 (patch)
tree4638f33217ec605f20d148a85c6d3b503d02a67b
parentd26526a36f58dd013bd73168c398899fceac3f0e (diff)
downloadCMake-611ffce98c731be0b86b25a2ff415190810546a0.zip
CMake-611ffce98c731be0b86b25a2ff415190810546a0.tar.gz
CMake-611ffce98c731be0b86b25a2ff415190810546a0.tar.bz2
ExternalProject: add an example of `LIST_SEPARATOR` usage
-rw-r--r--Modules/ExternalProject.cmake13
1 files changed, 12 insertions, 1 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 8b10135..89bee52 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -909,7 +909,18 @@ Miscellaneous Options
replace ``;`` with ``<sep>`` in the specified command lines.
This can be useful where list variables may be given in commands where
they should end up as space-separated arguments (``<sep>`` would be a
- single space character string in this case).
+ single space character string in this case). Note that the separator should
+ be chosen to avoid being confused for non-list-separator usages of the
+ sequence. For example, using ``LIST_SEPARATOR`` allows for passing list
+ values to CMake cache variables on the command line:
+
+ .. code-block:: cmake
+
+ ExternalProject_Add(example
+ ... # Download options, etc.
+ LIST_SEPARATOR ","
+ CMAKE_ARGS "-DCMAKE_PREFIX_PATH:STRING=${first_prefix},${second_prefix}"
+ )
``COMMAND <cmd>...``
Any of the other ``..._COMMAND`` options can have additional commands