summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-10-22 17:57:54 (GMT)
committerBrad King <brad.king@kitware.com>2020-12-15 12:00:52 (GMT)
commit7b64b0cd5a4046bf8743c3e2d3c57cb470bfa95f (patch)
treee054475a078a46be0c4c76e01c83409db0034481 /Source/cmLocalGenerator.cxx
parentd29da8ed3eb757d10643039aa738bad0727c1b6a (diff)
downloadCMake-7b64b0cd5a4046bf8743c3e2d3c57cb470bfa95f.zip
CMake-7b64b0cd5a4046bf8743c3e2d3c57cb470bfa95f.tar.gz
CMake-7b64b0cd5a4046bf8743c3e2d3c57cb470bfa95f.tar.bz2
cmLocalGenerator: Refactor custom command generator construction
Add support for constructing and using multiple generators for one custom command. cmGeneratorTarget contains a code path that needs this behavior when used with Ninja but not other generators, so use virtual dispatch through cmLocalGenerator.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index acc4c77..dc4a3fc 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -4232,6 +4232,15 @@ cmSourceFile* cmLocalGenerator::GetSourceFileWithOutput(
return nullptr;
}
+std::vector<cmCustomCommandGenerator>
+cmLocalGenerator::MakeCustomCommandGenerators(cmCustomCommand const& cc,
+ std::string const& config)
+{
+ std::vector<cmCustomCommandGenerator> ccgs;
+ ccgs.emplace_back(cc, config, this);
+ return ccgs;
+}
+
std::vector<std::string> cmLocalGenerator::ExpandCustomCommandOutputPaths(
cmCompiledGeneratorExpression const& cge, std::string const& config)
{