https://github.com/Kitware/CMake
Raw File
Tip revision: 372de3f8039f69b3a2edcf7120083ec4097f8bd3 authored by Brad King on 27 June 2017, 14:59:58 UTC
CMake 3.9.0-rc5
Tip revision: 372de3f
CMAKE_CURRENT_LIST_FILE.rst
CMAKE_CURRENT_LIST_FILE
-----------------------

Full path to the listfile currently being processed.

As CMake processes the listfiles in your project this variable will
always be set to the one currently being processed.  The value has
dynamic scope.  When CMake starts processing commands in a source file
it sets this variable to the location of the file.  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 file invoking the bottom-most entry on the call stack, not the
file containing the macro or function definition.

See also :variable:`CMAKE_PARENT_LIST_FILE`.
back to top