summaryrefslogtreecommitdiffstats
path: root/Source/cmGetSourceFilePropertyCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-01-30 16:21:54 (GMT)
committerBrad King <brad.king@kitware.com>2008-01-30 16:21:54 (GMT)
commitd5db5a275a1f6839d70ca0c76dfedb2e63705b58 (patch)
treed11704d58d75c7ed0e141caa2ba12c6ffde8e815 /Source/cmGetSourceFilePropertyCommand.cxx
parentc4093afc52967c987f0cd2947949899642db977b (diff)
downloadCMake-d5db5a275a1f6839d70ca0c76dfedb2e63705b58.zip
CMake-d5db5a275a1f6839d70ca0c76dfedb2e63705b58.tar.gz
CMake-d5db5a275a1f6839d70ca0c76dfedb2e63705b58.tar.bz2
BUG: Add cmSourceFile::GetPropertyForUser to centralize the LOCATION property hack. This fixes the LOCATION property when retrieved via the get_property command.
Diffstat (limited to 'Source/cmGetSourceFilePropertyCommand.cxx')
-rw-r--r--Source/cmGetSourceFilePropertyCommand.cxx16
1 files changed, 2 insertions, 14 deletions
diff --git a/Source/cmGetSourceFilePropertyCommand.cxx b/Source/cmGetSourceFilePropertyCommand.cxx
index a291a0c..b895735 100644
--- a/Source/cmGetSourceFilePropertyCommand.cxx
+++ b/Source/cmGetSourceFilePropertyCommand.cxx
@@ -38,24 +38,12 @@ bool cmGetSourceFilePropertyCommand
}
if(sf)
{
- if(args[2] == "LOCATION")
- {
- // 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();
- }
- else if(args[2] == "LANGUAGE")
+ if(args[2] == "LANGUAGE")
{
this->Makefile->AddDefinition(var, sf->GetLanguage());
return true;
}
- const char *prop = sf->GetProperty(args[2].c_str());
+ const char *prop = sf->GetPropertyForUser(args[2].c_str());
if (prop)
{
this->Makefile->AddDefinition(var, prop);