You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Beginning with CMake 3.27, you can specify a Windows SDK version in CMAKE_GENERATOR_PLATFORM. This variable can also be set with cmake -A or the architecture field in a configure preset. Consider the following presets.
cmake --preset msvc
...
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19045.
In VS Code, the msvc preset shows errors in the log when loading.
[ERROR:vcvarsall.bat] Invalid argument found : x64_x64=version
[ERROR:vcvarsall.bat] Error in script usage. The correct usage is:
but it does seem to work correctly?
[cmake] -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19045.
Without specifying version=10.0.19041.0, I see
[cmake] -- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
The ninja preset fails to find cl.exe when specifying version=10.0.19041.0, but it works without it.
[cmake] CMake Error at CMakeLists.txt:3 (project):
[cmake] The CMAKE_CXX_COMPILER:
[cmake]
[cmake] cl.exe
[cmake]
[cmake] is not a full path and was not found in the PATH.
@benschreiber Ah, this looks like the "magic" that we do in order to pull in the development environment from Visual Studio is failing when it tries to parse the arguments and call the vcvarsall.bat script. We'll add this to the backlog.
Brief Issue Summary
Beginning with CMake 3.27, you can specify a Windows SDK version in
CMAKE_GENERATOR_PLATFORM
. This variable can also be set withcmake -A
or thearchitecture
field in a configure preset. Consider the following presets.From the CLI, the
msvc
preset works correctly.In VS Code, the
msvc
preset shows errors in the log when loading.but it does seem to work correctly?
Without specifying
version=10.0.19041.0
, I seeThe
ninja
preset fails to findcl.exe
when specifyingversion=10.0.19041.0
, but it works without it.CMake Tools Diagnostics
Debug Log
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: