summaryrefslogtreecommitdiffstats
path: root/Source/cmGetSourceFilePropertyCommand.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2007-07-10 18:05:06 (GMT)
committerKen Martin <ken.martin@kitware.com>2007-07-10 18:05:06 (GMT)
commit9f2ee61cc81bc09c2b751e7133427011fb44a241 (patch)
tree27b71b91f81b8c6f4cb338432cb339615113a554 /Source/cmGetSourceFilePropertyCommand.cxx
parent8c641677e996bd2434233f37da39b34d9000a740 (diff)
downloadCMake-9f2ee61cc81bc09c2b751e7133427011fb44a241.zip
CMake-9f2ee61cc81bc09c2b751e7133427011fb44a241.tar.gz
CMake-9f2ee61cc81bc09c2b751e7133427011fb44a241.tar.bz2
ENH: added some documentation to explain a section of code a bit better
Diffstat (limited to 'Source/cmGetSourceFilePropertyCommand.cxx')
-rw-r--r--Source/cmGetSourceFilePropertyCommand.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmGetSourceFilePropertyCommand.cxx b/Source/cmGetSourceFilePropertyCommand.cxx
index 2b01f58..0cc9090 100644
--- a/Source/cmGetSourceFilePropertyCommand.cxx
+++ b/Source/cmGetSourceFilePropertyCommand.cxx
@@ -40,7 +40,14 @@ bool cmGetSourceFilePropertyCommand::InitialPass(
{
if(args[2] == "LOCATION")
{
- // Make sure the location is known.
+ // Make sure the location is known. Update: this is a hack to work
+ // around a problem with const methods in cmSourceFile, by design
+ // GetProperty("LOCATION") should work but right now it has to be
+ // "primed" by calling GetFullPath() first on a non-const cmSourceFile
+ // instance. This is because LOCATION is a computed-on-demand
+ // property. Either GetProperty needs to be non-const or the map
+ // needs to be changed to be mutable etc. for computed properties to
+ // work properly.
sf->GetFullPath();
}
const char *prop = sf->GetProperty(args[2].c_str());