Browse Source

Merge topic 'doc_undefined_mods'

46279eff38 Help: Document cases of variables modification having undefined behavior

Acked-by: Kitware Robot <[email protected]>
Merge-request: !10903
Brad King 8 months ago
parent
commit
3faa92ec71

+ 2 - 0
Help/variable/CMAKE_BINARY_DIR.rst

@@ -11,3 +11,5 @@ When run in :option:`cmake -P` script mode, CMake sets the variables
 ``CMAKE_BINARY_DIR``, :variable:`CMAKE_SOURCE_DIR`,
 :variable:`CMAKE_CURRENT_BINARY_DIR` and
 :variable:`CMAKE_CURRENT_SOURCE_DIR` to the current working directory.
+
+Modifying ``CMAKE_BINARY_DIR`` has undefined behavior.

+ 2 - 0
Help/variable/CMAKE_CURRENT_BINARY_DIR.rst

@@ -13,3 +13,5 @@ When run in :option:`cmake -P` script mode, CMake sets the variables
 :variable:`CMAKE_BINARY_DIR`, :variable:`CMAKE_SOURCE_DIR`,
 ``CMAKE_CURRENT_BINARY_DIR`` and
 :variable:`CMAKE_CURRENT_SOURCE_DIR` to the current working directory.
+
+Modifying ``CMAKE_CURRENT_BINARY_DIR`` has undefined behavior.

+ 2 - 0
Help/variable/CMAKE_CURRENT_SOURCE_DIR.rst

@@ -10,3 +10,5 @@ When run in :option:`cmake -P` script mode, CMake sets the variables
 :variable:`CMAKE_BINARY_DIR`, :variable:`CMAKE_SOURCE_DIR`,
 :variable:`CMAKE_CURRENT_BINARY_DIR` and
 ``CMAKE_CURRENT_SOURCE_DIR`` to the current working directory.
+
+Modifying ``CMAKE_CURRENT_SOURCE_DIR`` has undefined behavior.

+ 2 - 0
Help/variable/CMAKE_SOURCE_DIR.rst

@@ -11,3 +11,5 @@ When run in :option:`cmake -P` script mode, CMake sets the variables
 :variable:`CMAKE_BINARY_DIR`, ``CMAKE_SOURCE_DIR``,
 :variable:`CMAKE_CURRENT_BINARY_DIR` and
 :variable:`CMAKE_CURRENT_SOURCE_DIR` to the current working directory.
+
+Modifying ``CMAKE_SOURCE_DIR`` has undefined behavior.