summaryrefslogtreecommitdiffstats
path: root/Source/cmGetSourceFilePropertyCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGetSourceFilePropertyCommand.cxx')
-rw-r--r--Source/cmGetSourceFilePropertyCommand.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmGetSourceFilePropertyCommand.cxx b/Source/cmGetSourceFilePropertyCommand.cxx
index 3c149a4..4d444bc 100644
--- a/Source/cmGetSourceFilePropertyCommand.cxx
+++ b/Source/cmGetSourceFilePropertyCommand.cxx
@@ -31,6 +31,11 @@ bool cmGetSourceFilePropertyCommand::InitialPass(
const char* file = args[1].c_str();
cmSourceFile* sf = this->Makefile->GetSource(file);
+ // for the location we must create a source file first
+ if (!sf && args[2] == "LOCATION")
+ {
+ sf = this->Makefile->GetOrCreateSource(file);
+ }
if(sf)
{
const char *prop = sf->GetProperty(args[2].c_str());