[CMake] CMAKE_CURRENT_LIST_FILE in CMake 2.6.3

Bill Hoffman bill.hoffman at kitware.com
Tue Mar 24 16:40:29 EDT 2009


KSpam wrote:
> My build system relies heavily on CMAKE_CURRENT_LIST_FILE.  For instance, I 
> typically get a variable for the directory containing the current list file 
> as follows:
> 
> get_filename_component(scriptDir ${CMAKE_CURRENT_LIST_FILE} PATH)
> 
> This has worked in prior versions of CMake; however, it does  not work in 
> CMake 2.6.3 (apparently, CMAKE_CURRENT_LIST_FILE is empty).  Is this a bug, 
> or is it by design?
> 

Should work.  Do you have a small example that shows this issue?

-Bill


More information about the CMake mailing list