diff options
author | Ivan Zinkevich <ivan.zinkevich@gmail.com> | 2023-01-19 17:46:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-01-23 15:38:07 (GMT) |
commit | 33c15ae2b9bf62f7d0870b7ec01b297a29879513 (patch) | |
tree | 7ca2cb26e0c011c93a47513f0e867e6406983247 /Source/cmGlobalVisualStudio10Generator.cxx | |
parent | e107fd0713c93f8b7d5be54552b51b1632b34f8c (diff) | |
download | CMake-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/cmGlobalVisualStudio10Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio10Generator.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index a7a47ef..1e01dd6 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -1498,6 +1498,17 @@ bool cmGlobalVisualStudio10Generator::IsMsBuildRestoreSupported() const cmSystemTools::VersionCompareGreaterEq(*vsVer, vsVer15_7_5)); } +bool cmGlobalVisualStudio10Generator::IsBuildInParallelSupported() const +{ + if (this->Version >= VSVersion::VS16) { + return true; + } + + static std::string const vsVer15_8_0 = "15.8.27705.0"; + cm::optional<std::string> vsVer = this->GetVSInstanceVersion(); + return (vsVer && + cmSystemTools::VersionCompareGreaterEq(*vsVer, vsVer15_8_0)); +} std::string cmGlobalVisualStudio10Generator::GetClFlagTableName() const { std::string const& toolset = this->GetPlatformToolsetString(); |