From 89f26871b10941f042a9ab790bcb3937d1ede932 Mon Sep 17 00:00:00 2001 From: Javier Matos Date: Tue, 30 Apr 2024 18:00:18 -0400 Subject: [PATCH 1/2] Add support for VS 2022 using VS170COMNTOOLS environment variable --- src/vcpkg/visualstudio.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vcpkg/visualstudio.cpp b/src/vcpkg/visualstudio.cpp index 8df820b598..3f132bf71b 100644 --- a/src/vcpkg/visualstudio.cpp +++ b/src/vcpkg/visualstudio.cpp @@ -169,6 +169,7 @@ namespace vcpkg::VisualStudio // VS 2017 changed the installer such that cl.exe cannot be found by path navigation and // the env variable is only set when vcvars has been run. Therefore we close the safety valves. maybe_append_comntools("vs160comntools", "16.0", false); + maybe_append_comntools("VS170COMNTOOLS", "17.0", false); maybe_append_legacy_vs("vs140comntools", "Microsoft Visual Studio 14.0", "14.0"); maybe_append_legacy_vs("vs120comntools", "Microsoft Visual Studio 12.0", "12.0"); From 7f5ee1a802c488adef5ddf4e25fe22d1ea4b2262 Mon Sep 17 00:00:00 2001 From: Javier Matos Denizac Date: Wed, 1 May 2024 12:42:41 -0400 Subject: [PATCH 2/2] keep existing pattern Co-authored-by: Billy O'Neal --- src/vcpkg/visualstudio.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vcpkg/visualstudio.cpp b/src/vcpkg/visualstudio.cpp index 3f132bf71b..78ddf629c2 100644 --- a/src/vcpkg/visualstudio.cpp +++ b/src/vcpkg/visualstudio.cpp @@ -168,8 +168,8 @@ namespace vcpkg::VisualStudio // VS 2017 changed the installer such that cl.exe cannot be found by path navigation and // the env variable is only set when vcvars has been run. Therefore we close the safety valves. + maybe_append_comntools("vs170comntools", "17.0", false); maybe_append_comntools("vs160comntools", "16.0", false); - maybe_append_comntools("VS170COMNTOOLS", "17.0", false); maybe_append_legacy_vs("vs140comntools", "Microsoft Visual Studio 14.0", "14.0"); maybe_append_legacy_vs("vs120comntools", "Microsoft Visual Studio 12.0", "12.0");