[CMake] Are CMake files aware of their path?

Alexander Neundorf a.neundorf-work at gmx.net
Tue Oct 20 17:29:02 EDT 2009


On Tuesday 20 October 2009, James C. Sutherland wrote:
> If I add a CMake file via add_subdirectory is there a way to obtain
> its absolute or relative path?

Check ${CMAKE_CURRENT_LIST_FILE}, you may combine this with 
get_filename_component().

Alex


More information about the CMake mailing list