summaryrefslogtreecommitdiff
path: root/Help/variable/CMAKE_CURRENT_LIST_DIR.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Help/variable/CMAKE_CURRENT_LIST_DIR.rst')
-rw-r--r--Help/variable/CMAKE_CURRENT_LIST_DIR.rst17
1 files changed, 17 insertions, 0 deletions
diff --git a/Help/variable/CMAKE_CURRENT_LIST_DIR.rst b/Help/variable/CMAKE_CURRENT_LIST_DIR.rst
new file mode 100644
index 000000000..ebc3ab9c9
--- /dev/null
+++ b/Help/variable/CMAKE_CURRENT_LIST_DIR.rst
@@ -0,0 +1,17 @@
+CMAKE_CURRENT_LIST_DIR
+----------------------
+
+Full directory of the listfile currently being processed.
+
+As CMake processes the listfiles in your project this variable will
+always be set to the directory where the listfile which is currently
+being processed (:variable:`CMAKE_CURRENT_LIST_FILE`) is located. The value
+has dynamic scope. When CMake starts processing commands in a source file
+it sets this variable to the directory where this file is located.
+When CMake finishes processing commands from the file it restores the
+previous value. Therefore the value of the variable inside a macro or
+function is the directory of the file invoking the bottom-most entry
+on the call stack, not the directory of the file containing the macro
+or function definition.
+
+See also :variable:`CMAKE_CURRENT_LIST_FILE`.