View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007757CMakeCMakepublic2008-09-30 11:522008-10-01 14:15
ReporterJames Bigler 
Assigned ToBill Hoffman 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in Version 
Summary0007757: Need mechanism to discover actual path of file on disc
DescriptionCMAKE_CURRENT_SOURCE_DIR only reports the location of where CMake is processing a script. If a scrip is included via the include or find_package command CMAKE_CURRENT_SOURCE_DIR reports the location of where those calls were make and not where the included scripts live on disc.

I think it would be useful to be able to get access to the location of included scripts via a new variable CMAKE_CURRENT_DISC_DIR or something. The included scripts could be parsed while being included and replaced the CMAKE_CURRENT_DISC_DIR with the path of the file.

The reason I want this, is so I could use a library of additional CMake scripts that make use of other scripts and files used for the configure_file (which needs full paths). Currently, I have to put the library in the exact same place relative to my project so that CMAKE_CURRENT_SOURCE_DIR remains consistent within my CMake script library.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0013628)
Bill Hoffman (manager)
2008-10-01 09:10

There is CMAKE_CURRENT_LIST_FILE, and you can get the path out of that?
(0013658)
James Bigler (developer)
2008-10-01 13:58

That was just what I needed. Thanks.

 Issue History
Date Modified Username Field Change
2008-09-30 11:53 James Bigler New Issue
2008-10-01 09:10 Bill Hoffman Note Added: 0013628
2008-10-01 09:10 Bill Hoffman Status new => assigned
2008-10-01 09:10 Bill Hoffman Assigned To => Bill Hoffman
2008-10-01 13:58 James Bigler Note Added: 0013658
2008-10-01 14:15 Bill Hoffman Status assigned => closed
2008-10-01 14:15 Bill Hoffman Resolution open => fixed


Copyright © 2000 - 2018 MantisBT Team