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
First CMake Configuration works, all subsequent CMake configurations work. CMake command line should be:
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --no-warn-unused-cli -Hc:/Code/myProj -Bc:/Code/myProj/build -G "Visual Studio 14 2015" -T v140 -A x64
Apparent Behavior:
For subsequent builds, platform and toolset are reversed, resulting in the error:
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --no-warn-unused-cli -Hc:/Code/myProj-Bc:/Code/myProj/build -G "Visual Studio 14 2015" -T x64 -A v140
[cmake] CMake Error: Error: generator platform: v140
[cmake] Does not match the platform used previously: x64
Example:
settings.json:
{
"cmake.generator": "Visual Studio 14 2015",
"cmake.toolset": "v140",
"cmake.platform":"x64",
}
CMake Tools Log
[main] Configuring folder: myProj
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --no-warn-unused-cli -Hc:/Code/myProj-Bc:/Code/myProj/build -G "Visual Studio 14 2015" -T x64 -A v140
[cmake] Not searching for unused variables given on the command line.
[cmake] CMake Error: Error: generator platform: v140
[cmake] Does not match the platform used previously: x64
[cmake] Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.
Platform and Versions
Operating System: Windows 10 x64
CMake Version: 3.16.2
VSCode Version: 1.42
CMake Tools Extension Version: 1.3.0
Compiler/Toolchain: Visual C++ 2015 amd64
The text was updated successfully, but these errors were encountered:
I confirm this bug which is pretty annoying since it forces me to recreate the build directory every time I restart VS Code.
However in my case I have nothing related to cmake.toolset and cmake.platform in settings.json (I checked workspace and user settings). I'm just using the "CMake: Select Kit" command the first time I configure, after that vscode-cmake-tools seems to be able to remember what to use even if it's not in my settings, but as mentionned in the issue it put "-T x64" in the command line instead of "-A x64".
Brief Issue Summary
When a
cmake.toolset
andcmake.platform
are set insettings.json
, they are used correctly on the first CMake configuration.After restarting VS Code, on subsequent configurations, these values are mixed up when read from
CMakeCache.txt
.In
src/drivers/cmfileap-driveri.ts
(line 68 in thedevelop
branch),toolset
should beplatform
andplatform
should betoolset
.May relate to #222.
Expected:
First CMake Configuration works, all subsequent CMake configurations work. CMake command line should be:
Apparent Behavior:
For subsequent builds, platform and toolset are reversed, resulting in the error:
Example:
settings.json
:CMake Tools Log
Platform and Versions
The text was updated successfully, but these errors were encountered: