summaryrefslogtreecommitdiffstats
path: root/Help/command
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2019-12-08 00:26:14 (GMT)
committerAlex Turbov <i.zaufi@gmail.com>2019-12-10 14:43:27 (GMT)
commit90e3e2a7778dc0ec5b421e9657ec49936a3cf174 (patch)
tree6788ff83fc4a9cd7e0e87a2f33f7a3cf0d87d216 /Help/command
parentdd54290dab61c3342866c71052145271c13468ad (diff)
downloadCMake-90e3e2a7778dc0ec5b421e9657ec49936a3cf174.zip
CMake-90e3e2a7778dc0ec5b421e9657ec49936a3cf174.tar.gz
CMake-90e3e2a7778dc0ec5b421e9657ec49936a3cf174.tar.bz2
cmFunctionCommand: Introduce `CMAKE_CURRENT_FUNCTION*` variables
`CMAKE_CURRENT_FUNCTION` Can be used for diagnostic or debugging messages like the `__PRETTY_FUNCTION__` macro of GCC. `CMAKE_CURRENT_FUNCTION_LIST_DIR` Eliminates the necessity of the additional "global" variables inside a module used to access additional "resource" files from functions defined in the module. ...
Diffstat (limited to 'Help/command')
-rw-r--r--Help/command/macro.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/Help/command/macro.rst b/Help/command/macro.rst
index 05e5d79..3f6f2f9 100644
--- a/Help/command/macro.rst
+++ b/Help/command/macro.rst
@@ -91,6 +91,12 @@ just terminate execution of the macro; rather, control is returned
from the scope of the macro call. To avoid confusion, it is recommended
to avoid :command:`return()` in macros altogether.
+Unlike a function, the :variable:`CMAKE_CURRENT_FUNCTION`,
+:variable:`CMAKE_CURRENT_FUNCTION_LIST_DIR`,
+:variable:`CMAKE_CURRENT_FUNCTION_LIST_FILE`,
+:variable:`CMAKE_CURRENT_FUNCTION_LIST_LINE` variables are not
+set for macro.
+
.. _`Argument Caveats`:
Argument Caveats