mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-23 22:58:37 -05:00
file(MAKE_DIRECTORY): Add optional RESULT keyword to capture failure.
Fixes: #26041
This commit is contained in:
+10
-1
@@ -398,10 +398,19 @@ Filesystem
|
||||
============== ======================================================
|
||||
|
||||
.. signature::
|
||||
file(MAKE_DIRECTORY <directories>...)
|
||||
file(MAKE_DIRECTORY <directories>... [RESULT <result>])
|
||||
|
||||
Create the given directories and their parents as needed.
|
||||
|
||||
The options are:
|
||||
|
||||
``RESULT <result>``
|
||||
.. versionadded:: 3.31
|
||||
|
||||
Set ``<result>`` variable to ``0`` on success or an error message
|
||||
otherwise. If ``RESULT`` is not specified and the operation fails,
|
||||
an error is emitted.
|
||||
|
||||
.. versionchanged:: 3.30
|
||||
``<directories>`` can be an empty list. CMake 3.29 and earlier required
|
||||
at least one directory to be given.
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
make_directory-optional-result
|
||||
------------------------------
|
||||
|
||||
* The :command:`file(MAKE_DIRECTORY)` learned to
|
||||
optionally capture failure in a result variable.
|
||||
Reference in New Issue
Block a user