summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalNinjaGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmLocalNinjaGenerator.cxx')
-rw-r--r--Source/cmLocalNinjaGenerator.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index d9517d8..b2927a9 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -398,6 +398,16 @@ cmLocalNinjaGenerator::WriteCustomCommandBuildStatement(
const std::vector<std::string> &byproducts = ccg.GetByproducts();
cmNinjaDeps ninjaOutputs(outputs.size()+byproducts.size()), ninjaDeps;
+ bool symbolic = false;
+ for (std::vector<std::string>::const_iterator o = outputs.begin();
+ o != outputs.end(); ++o)
+ {
+ if (cmSourceFile* sf = this->Makefile->GetSource(*o))
+ {
+ symbolic = sf->GetPropertyAsBool("SYMBOLIC");
+ }
+ }
+
#if 0
#error TODO: Once CC in an ExternalProject target must provide the \
file of each imported target that has an add_dependencies pointing \
@@ -434,7 +444,7 @@ cmLocalNinjaGenerator::WriteCustomCommandBuildStatement(
this->ConstructComment(ccg),
"Custom command for " + ninjaOutputs[0],
cc->GetUsesTerminal(),
- /*restat*/true,
+ /*restat*/!symbolic,
ninjaOutputs,
ninjaDeps,
orderOnlyDeps);