summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaUtilityTargetGenerator.cxx
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/cmNinjaUtilityTargetGenerator.cxx
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/cmNinjaUtilityTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaUtilityTargetGenerator.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmNinjaUtilityTargetGenerator.cxx b/Source/cmNinjaUtilityTargetGenerator.cxx
index 7adeb8e..cc6d4b9 100644
--- a/Source/cmNinjaUtilityTargetGenerator.cxx
+++ b/Source/cmNinjaUtilityTargetGenerator.cxx
@@ -96,8 +96,8 @@ void cmNinjaUtilityTargetGenerator::Generate()
this->GetBuildFileStream(),
"Utility command for " + this->GetTargetName(), outputs, deps);
} else {
- std::string command =
- this->GetLocalGenerator()->BuildCommandLine(commands);
+ std::string command = this->GetLocalGenerator()->BuildCommandLine(
+ commands, "utility", this->GeneratorTarget);
const char* echoStr =
this->GetGeneratorTarget()->GetProperty("EchoString");
std::string desc;