summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorIvan Zinkevich <ivan.zinkevich@gmail.com>2023-01-19 17:46:53 (GMT)
committerBrad King <brad.king@kitware.com>2023-01-23 15:38:07 (GMT)
commit33c15ae2b9bf62f7d0870b7ec01b297a29879513 (patch)
tree7ca2cb26e0c011c93a47513f0e867e6406983247 /Source/cmVisualStudio10TargetGenerator.cxx
parente107fd0713c93f8b7d5be54552b51b1632b34f8c (diff)
downloadCMake-33c15ae2b9bf62f7d0870b7ec01b297a29879513.zip
CMake-33c15ae2b9bf62f7d0870b7ec01b297a29879513.tar.gz
CMake-33c15ae2b9bf62f7d0870b7ec01b297a29879513.tar.bz2
VS: Build custom commands concurrently when possible
Enable the `BuildInParallel` setting in VS project files when supported. Fixes: #18405
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index ce9a842..5065876 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1807,7 +1807,8 @@ void cmVisualStudio10TargetGenerator::WriteCustomRule(
outputs.str(), comment, ccg);
} else {
this->WriteCustomRuleCpp(*spe2, c, script, additional_inputs.str(),
- outputs.str(), comment, ccg, symbolic);
+ outputs.str(), comment, ccg, symbolic,
+ command.GetUsesTerminal());
}
}
}
@@ -1816,9 +1817,12 @@ void cmVisualStudio10TargetGenerator::WriteCustomRuleCpp(
Elem& e2, std::string const& config, std::string const& script,
std::string const& additional_inputs, std::string const& outputs,
std::string const& comment, cmCustomCommandGenerator const& ccg,
- bool symbolic)
+ bool symbolic, bool uses_terminal)
{
const std::string cond = this->CalcCondition(config);
+ if (this->GlobalGenerator->IsBuildInParallelSupported() && !uses_terminal) {
+ e2.WritePlatformConfigTag("BuildInParallel", cond, "true");
+ }
e2.WritePlatformConfigTag("Message", cond, comment);
e2.WritePlatformConfigTag("Command", cond, script);
e2.WritePlatformConfigTag("AdditionalInputs", cond, additional_inputs);