summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileTargetGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileTargetGenerator.cxx28
1 files changed, 27 insertions, 1 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 118db99..d4c61cc 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -775,6 +775,23 @@ void cmMakefileTargetGenerator::WriteTargetDependRules()
this->LocalGenerator->
WriteDependLanguageInfo(*this->InfoFileStream,*this->Target);
+ // Store multiple output pairs in the depend info file.
+ if(!this->MultipleOutputPairs.empty())
+ {
+ *this->InfoFileStream
+ << "\n"
+ << "# Pairs of files generated by the same build rule.\n"
+ << "SET(CMAKE_MULTIPLE_OUTPUT_PAIRS\n";
+ for(MultipleOutputPairsType::const_iterator pi =
+ this->MultipleOutputPairs.begin();
+ pi != this->MultipleOutputPairs.end(); ++pi)
+ {
+ *this->InfoFileStream << " \"" << pi->first << "\" \""
+ << pi->second << "\"\n";
+ }
+ *this->InfoFileStream << " )\n\n";
+ }
+
// and now write the rule to use it
std::vector<std::string> depends;
std::vector<std::string> commands;
@@ -993,7 +1010,7 @@ cmMakefileTargetGenerator
// the check-build-system step will remove the primary output if any
// extra outputs are missing. This forces the rule to regenerate
// all outputs.
- this->GlobalGenerator->AddMultipleOutputPair(out, in);
+ this->AddMultipleOutputPair(out, in);
}
//----------------------------------------------------------------------------
@@ -1334,3 +1351,12 @@ void cmMakefileTargetGenerator::WriteProgressVariables(unsigned long total,
current += this->NumberOfProgressActions;
delete progressFileStream;
}
+
+//----------------------------------------------------------------------------
+void
+cmMakefileTargetGenerator
+::AddMultipleOutputPair(const char* depender, const char* dependee)
+{
+ MultipleOutputPairsType::value_type p(depender, dependee);
+ this->MultipleOutputPairs.insert(p);
+}