diff options
author | elksson <ialastairhunter@me.com> | 2022-09-21 19:54:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-09-22 14:52:33 (GMT) |
commit | 2d54d6f3957a0cf4962ee73a9e0af6d0e13253c8 (patch) | |
tree | 5ec09507d43c310fbcf1ec3283317b9713a27175 /Source | |
parent | 79c9e657092e64c12196dc8e5344dc3c8e9a02f9 (diff) | |
download | CMake-2d54d6f3957a0cf4962ee73a9e0af6d0e13253c8.zip CMake-2d54d6f3957a0cf4962ee73a9e0af6d0e13253c8.tar.gz CMake-2d54d6f3957a0cf4962ee73a9e0af6d0e13253c8.tar.bz2 |
VS: Fix PACKAGE target build with SDK-style projects
Extend the fix from commit a450cc9533 (VS: Set ResolveNugetPackages to
false for ALL_BUILD and ZERO_CHECK, 2021-12-15, v3.23.0-rc1~196^2~1) to
the `PACKAGE` target too.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 4c1fa01..9b40542 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -495,7 +495,7 @@ void cmVisualStudio10TargetGenerator::WriteClassicMsBuildProjectFile( e1.Element("PreferredToolArchitecture", hostArch); } - // ALL_BUILD and ZERO_CHECK projects transitively include + // The ALL_BUILD, PACKAGE, and ZERO_CHECK projects transitively include // Microsoft.Common.CurrentVersion.targets which triggers Target // ResolveNugetPackageAssets when SDK-style targets are in the project. // However, these projects have no nuget packages to reference and the @@ -503,7 +503,7 @@ void cmVisualStudio10TargetGenerator::WriteClassicMsBuildProjectFile( // Setting ResolveNugetPackages to false skips this target and the build // succeeds. cm::string_view targetName{ this->GeneratorTarget->GetName() }; - if (targetName == "ALL_BUILD" || + if (targetName == "ALL_BUILD" || targetName == "PACKAGE" || targetName == CMAKE_CHECK_BUILD_SYSTEM_TARGET) { Elem e1(e0, "PropertyGroup"); e1.Element("ResolveNugetPackages", "false"); |