diff options
author | Brad King <brad.king@kitware.com> | 2019-05-15 13:20:24 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-05-15 13:21:08 (GMT) |
commit | 0064edf4173fad72749da2c66753387e9a671223 (patch) | |
tree | ed3b08a0ecf709ca9281cdea448945bcba957a01 /Source/cmGlobalNinjaGenerator.cxx | |
parent | ac0411f1662f64fe1320e22e5a8906b8a40d6677 (diff) | |
parent | 9f76961de87d8911d13867d469c38087e47a0b60 (diff) | |
download | CMake-0064edf4173fad72749da2c66753387e9a671223.zip CMake-0064edf4173fad72749da2c66753387e9a671223.tar.gz CMake-0064edf4173fad72749da2c66753387e9a671223.tar.bz2 |
Merge topic 'ninja-pool-custom-command'
9f76961de8 Support job pools in custom commands and targets
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3308
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 1b973e0..67c22a7 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -250,8 +250,9 @@ void cmGlobalNinjaGenerator::AddCustomCommandRule() void cmGlobalNinjaGenerator::WriteCustomCommandBuild( const std::string& command, const std::string& description, - const std::string& comment, const std::string& depfile, bool uses_terminal, - bool restat, const cmNinjaDeps& outputs, const cmNinjaDeps& deps, + const std::string& comment, const std::string& depfile, + const std::string& job_pool, bool uses_terminal, bool restat, + const cmNinjaDeps& outputs, const cmNinjaDeps& deps, const cmNinjaDeps& orderOnly) { std::string cmd = command; // NOLINT(*) @@ -271,6 +272,8 @@ void cmGlobalNinjaGenerator::WriteCustomCommandBuild( } if (uses_terminal && SupportsConsolePool()) { vars["pool"] = "console"; + } else if (!job_pool.empty()) { + vars["pool"] = job_pool; } if (!depfile.empty()) { vars["depfile"] = depfile; @@ -925,7 +928,8 @@ void cmGlobalNinjaGenerator::WriteAssumedSourceDependencies() std::back_inserter(orderOnlyDeps)); WriteCustomCommandBuild(/*command=*/"", /*description=*/"", "Assume dependencies for generated source file.", - /*depfile*/ "", /*uses_terminal*/ false, + /*depfile*/ "", /*job_pool*/ "", + /*uses_terminal*/ false, /*restat*/ true, cmNinjaDeps(1, asd.first), cmNinjaDeps(), orderOnlyDeps); } |