On Windows, I have a CMake based project where if I run cmake -SC:/project -BC:/project/build -G "Visual Studio 16 2019", it will generate a project that I can build.
If I use the "Configure" button in the CMake Tools extension, it logs that it's running C:/Program Files/CMake/bin/cmake.exe" -SC:/project -BC:project/build/Windows -G "Visual Studio 16 2019" but the generated project ends up throwing tons of errors during the build process. Things like
[main] Configuring project: project
[proc] Executing command: "C:/Program Files/CMake/bin/cmake.exe" -SC:/Users/username/dev/project -BC:/Users/username/dev/project/build/Windows -G "Visual Studio 16 2019"
[cmake] -- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22631.
[cmake] -- The C compiler identification is MSVC 19.29.30154.0
[cmake] -- The CXX compiler identification is MSVC 19.29.30154.0
[cmake] -- The ASM compiler identification is MSVC
[cmake] -- Found assembler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe
[cmake] -- Detecting C compiler ABI info
[cmake] -- Detecting C compiler ABI info - done
[cmake] -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
[cmake] -- Detecting C compile features
[cmake] -- Detecting C compile features - done
[cmake] -- Detecting CXX compiler ABI info
[cmake] -- Detecting CXX compiler ABI info - done
[cmake] -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
[cmake] -- Detecting CXX compile features
[cmake] -- Detecting CXX compile features - done
[cmake] -- Configuring juceaide
[cmake] -- Building juceaide
[cmake] -- Exporting juceaide
[cmake] C:/Users/username/dev/project/build/Windows
[cmake] -- Configuring done (37.7s)
[cmake] -- Generating done (1.1s)
[cmake] -- Build files have been written to: C:/Users/username/dev/project/build/Windows
Additional Information
Considering the simplicity of the cmake command that generates the project successfully at the command line, I'm curious as to what the extension must be augmenting to generate a project that cannot build.
Brief Issue Summary
On Windows, I have a CMake based project where if I run
cmake -SC:/project -BC:/project/build -G "Visual Studio 16 2019"
, it will generate a project that I can build. If I use the "Configure" button in the CMake Tools extension, it logs that it's runningC:/Program Files/CMake/bin/cmake.exe" -SC:/project -BC:project/build/Windows -G "Visual Studio 16 2019"
but the generated project ends up throwing tons of errors during the build process. Things likeCMake Tools Diagnostics
Debug Log
Additional Information
Considering the simplicity of the cmake command that generates the project successfully at the command line, I'm curious as to what the extension must be augmenting to generate a project that cannot build.