CMAKE_CURRENT_LIST_FILE.rst 665 B

123456789101112131415
  1. CMAKE_CURRENT_LIST_FILE
  2. -----------------------
  3. Full path to the listfile currently being processed.
  4. As CMake processes the listfiles in your project this variable will
  5. always be set to the one currently being processed. The value has
  6. dynamic scope. When CMake starts processing commands in a source file
  7. it sets this variable to the location of the file. When CMake
  8. finishes processing commands from the file it restores the previous
  9. value. Therefore the value of the variable inside a macro or function
  10. is the file invoking the bottom-most entry on the call stack, not the
  11. file containing the macro or function definition.
  12. See also CMAKE_PARENT_LIST_FILE.