summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalNinjaGenerator.h
diff options
context:
space:
mode:
authorRoger Leigh <rleigh@dundee.ac.uk>2017-12-14 16:09:02 (GMT)
committerBrad King <brad.king@kitware.com>2018-02-06 18:24:46 (GMT)
commit22e8b3af041f49842aeafa2d97129f422404d7de (patch)
tree3d2c76d931789a162114d38023faeeea1cc90760 /Source/cmLocalNinjaGenerator.h
parentf7c08c333b3ccd86134f73a8a3df5bf59c53bdd8 (diff)
downloadCMake-22e8b3af041f49842aeafa2d97129f422404d7de.zip
CMake-22e8b3af041f49842aeafa2d97129f422404d7de.tar.gz
CMake-22e8b3af041f49842aeafa2d97129f422404d7de.tar.bz2
Ninja: Generate scripts for long custom command sequences
Ninja runs just one command line for every build statement, so the Ninja generator needs to `&&`-chain multiple commands together into one long string. For long custom command sequences this can exceed the maximum command-line length for the operating system. In such cases, write the commands out to a script instead, and then run the script from Ninja's one command line. Co-Author: Brad King <brad.king@kitware.com> Fixes: #15612
Diffstat (limited to 'Source/cmLocalNinjaGenerator.h')
-rw-r--r--Source/cmLocalNinjaGenerator.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h
index 95d8a61..f772fb0 100644
--- a/Source/cmLocalNinjaGenerator.h
+++ b/Source/cmLocalNinjaGenerator.h
@@ -59,7 +59,10 @@ public:
return this->HomeRelativeOutputPath;
}
- std::string BuildCommandLine(const std::vector<std::string>& cmdLines);
+ std::string BuildCommandLine(
+ std::vector<std::string> const& cmdLines,
+ std::string const& customStep = std::string(),
+ cmGeneratorTarget const* target = nullptr) const;
void AppendTargetOutputs(cmGeneratorTarget* target, cmNinjaDeps& outputs);
void AppendTargetDepends(
@@ -98,6 +101,10 @@ private:
std::string MakeCustomLauncher(cmCustomCommandGenerator const& ccg);
+ std::string WriteCommandScript(std::vector<std::string> const& cmdLines,
+ std::string const& customStep,
+ cmGeneratorTarget const* target) const;
+
std::string HomeRelativeOutputPath;
typedef std::map<cmCustomCommand const*, std::set<cmGeneratorTarget*>>