mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-07 04:02:23 +03:00
Help: Document execute_process(RESULT_VARIABLE) capture in source code guide
Issue: #27782
This commit is contained in:
1 parent
46410ea189
commit
c720e2a23d
1 file changed
+9
@@ -329,6 +329,15 @@ It is allowed to pass raw pointers between objects to enable objects sharing.
|
||||
A raw pointer **must** not be deleted. Only the object(s) owning the smart
|
||||
pointer are allowed to delete dynamically allocated memory.
|
||||
|
||||
CMake Module/Script Style
|
||||
=========================
|
||||
|
||||
``execute_process`` should capture ``RESULT_VARIABLE`` to avoid
|
||||
unexpected termination of CMake in case the user or project has set
|
||||
``CMAKE_EXECUTE_PROCESS_COMMAND_ERROR_IS_FATAL`` to a value other than
|
||||
``NONE``. Output should be captured for both stdout and stderr by using
|
||||
``OUTPUT_VARIABLE``/``OUTPUT_QUIET`` and ``ERROR_VARIABLE``/``ERROR_QUIET``.
|
||||
|
||||
Third Parties
|
||||
=============
|
||||
|
||||
|
||||
Reference in new issue
Block a user