[WIP] Fix invalid field 'host=x86' in CMake configuration #4707
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
host=x86toolset is passed via-Tflagkit.tsline 809 setstoolset: majorVersion < 15 ? undefined : host, meaning VS 2017 getshost=x86which its bundled CMake doesn't supportmajorVersion < 15tomajorVersion < 16to exclude VS 2017 fromhost=toolset generationOriginal prompt
This section details on the original issue you should resolve
<issue_title>that contains invalid field 'host=x86'.</issue_title>
<issue_description>### Brief Issue Summary
When selecting Visual Studio Enterprise 2017 Release - x86 configuring cmake fails.
Selecting Visual Studio Professional 2022 Release - x86 works.
CMake Tools Diagnostics
{ "os": "win32", "vscodeVersion": "1.83.1", "cmtVersion": "1.19.51", "configurations": [ { "folder": "c:\\work\\sdp\\slc_env_agent_ex", "cmakeVersion": "3.12.18081601", "configured": true, "generator": "Visual Studio 15 2017", "usesPresets": false, "compilers": {} } ], "cpptoolsIntegration": { "isReady": false, "hasCodeModel": false, "activeBuildType": "", "buildTypesSeen": [], "requests": [], "responses": [], "partialMatches": [], "targetCount": 0, "executablesCount": 0, "librariesCount": 0, "targets": [] }, "settings": [ { "communicationMode": "automatic", "useCMakePresets": "auto", "configureOnOpen": true } ] } and here is the output when running the CMake:configure command: [driver] Switching to kit: Visual Studio Enterprise 2017 Release - x86 [main] Configuring project: slc_env_agent_ex [cmake] Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045. [cmake] CMake Error at CMakeLists.txt:3 (project): [cmake] Generator [cmake] [cmake] Visual Studio 15 2017 [cmake] [cmake] given toolset specification [cmake] [cmake] host=x86 [cmake] [cmake] that contains invalid field 'host=x86'. [cmake] [cmake] [cmake] Configuring incomplete, errors occurred! [cmake] See also "c:/work/sdp/slc_env_agent_ex/build/CMakeFiles/CMakeOutput.log". [cms-driver] Error during CMake configure: Error: Configuration failed. at CMakeServerClient.onMessage (c:\Users\Administrator\.vscode\extensions\ms-vscode.cmake-tools-1.19.51\dist\main.js:97258:33) at CMakeServerClient.onMoreData (c:\Users\Administrator\.vscode\extensions\ms-vscode.cmake-tools-1.19.51\dist\main.js:97231:18) at Socket.emit (node:events:513:28) at addChunk (node:internal/streams/readable:324:12) at readableAddChunk (node:internal/streams/readable:297:9) at Readable.push (node:internal/streams/readable:234:10) at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)Debug Log