Help: Document execute_process(RESULT_VARIABLE) capture in source code guide

Issue: #27782
This commit is contained in:
scivision authored and Brad King committed 2026-05-07 13:42:00 -04:00
1 parent 46410ea189
commit c720e2a23d
1 file changed
+9
+9
View File
@@ -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
=============