summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-12-21 17:22:12 (GMT)
committerBrad King <brad.king@kitware.com>2007-12-21 17:22:12 (GMT)
commitd83b4cd255bcd13b5b7e4279a6e3e959fcb58688 (patch)
tree1987a83567e98da043994e7fa870fe48c7b08c8a /Source/cmMakefileTargetGenerator.cxx
parent6586149d64be27694652b40bfbcc4d19f6c2c5eb (diff)
downloadCMake-d83b4cd255bcd13b5b7e4279a6e3e959fcb58688.zip
CMake-d83b4cd255bcd13b5b7e4279a6e3e959fcb58688.tar.gz
CMake-d83b4cd255bcd13b5b7e4279a6e3e959fcb58688.tar.bz2
ENH: Add a depends check step to custom targets. Add support for the IMPLICIT_DEPENDS feature of custom commands when building in custom targets. Convert multiple-output pair checks to be per-target instead of global.
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);
+}