summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-10-02 14:20:53 (GMT)
committerBrad King <brad.king@kitware.com>2006-10-02 14:20:53 (GMT)
commite4ec89d0360408cc4ad2bb6428be06749d8b11ba (patch)
tree731bf6a54de529453b4ca6039ba60c6ca49f0537 /Source/cmMakefileTargetGenerator.cxx
parentbb01a0d6baa948ca35efc8bed91e48756dd13a20 (diff)
downloadCMake-e4ec89d0360408cc4ad2bb6428be06749d8b11ba.zip
CMake-e4ec89d0360408cc4ad2bb6428be06749d8b11ba.tar.gz
CMake-e4ec89d0360408cc4ad2bb6428be06749d8b11ba.tar.bz2
ENH: Added SYMBOLIC source file property to mark custom command outputs that are never actually created on disk. This is used by the Watcom WMake generator to generate the .SYMBOLIC mark on the files in the make system.
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileTargetGenerator.cxx25
1 files changed, 23 insertions, 2 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index cc16069..449d37a 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -862,12 +862,25 @@ void cmMakefileTargetGenerator
std::vector<std::string> depends;
this->LocalGenerator->AppendCustomDepend(depends, cc);
+ // Check whether we need to bother checking for a symbolic output.
+ bool need_symbolic = this->GlobalGenerator->GetNeedSymbolicMark();
+
// Write the rule.
const std::vector<std::string>& outputs = cc.GetOutputs();
std::vector<std::string>::const_iterator o = outputs.begin();
+ {
+ bool symbolic = false;
+ if(need_symbolic)
+ {
+ if(cmSourceFile* sf = this->Makefile->GetSource(o->c_str()))
+ {
+ symbolic = sf->GetPropertyAsBool("SYMBOLIC");
+ }
+ }
this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0,
o->c_str(), depends, commands,
- false);
+ symbolic);
+ }
// If the rule has multiple outputs, add a rule for the extra
// outputs to just depend on the first output with no command. Also
@@ -887,9 +900,17 @@ void cmMakefileTargetGenerator
}
for(++o; o != outputs.end(); ++o)
{
+ bool symbolic = false;
+ if(need_symbolic)
+ {
+ if(cmSourceFile* sf = this->Makefile->GetSource(o->c_str()))
+ {
+ symbolic = sf->GetPropertyAsBool("SYMBOLIC");
+ }
+ }
this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0,
o->c_str(), depends, commands,
- false);
+ symbolic);
gg->AddMultipleOutputPair(o->c_str(), depends[0].c_str());
}
}