Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for clang compilers to be set in presets without full path #1922

Closed
Zingam opened this issue Jun 8, 2021 · 14 comments
Closed

Allow for clang compilers to be set in presets without full path #1922

Zingam opened this issue Jun 8, 2021 · 14 comments

Comments

@Zingam
Copy link
Contributor

Zingam commented Jun 8, 2021

With the following "preset" I can configure and build the "Hello World" application in VS2019 successfully. In VSCode I get linker errors:

[cmake] LINK : fatal error LNK1104: cannot open file 'kernel32.lib'
[cmake] ninja: build stopped: subcommand failed.

There is no issue if the build generator is Visual Studio. Is there anything else necessary to configure for Ninja I am not seeing anything about that in the documentation and I expect for it to just work as in VS2019.

{
    "version": 2,
    "cmakeMinimumRequired": {
        "major": 3,
        "minor": 20,
        "patch": 0
    },
    "configurePresets": [
        {
            "name": "default",
            "hidden": true,
            "binaryDir": "${sourceDir}/../../__build/${presetName}",
            "cacheVariables": {
                "CMAKE_INSTALL_PREFIX": "${sourceDir}/../../__install/${presetName}"
            }
        },
        {
            "name": "default-x64-windows-ninja",
            "hidden": true,
            "inherits": [
                "default"
            ],
            "generator": "Ninja",
            "architecture": {
                "value": "x64",
                "strategy": "external"
            },
            "vendor": {
                "microsoft.com/VisualStudioSettings/CMake/1.0": {
                  "hostOS": [ "Windows" ]
                }
              }
        },
        {
            "name": "windows-x64-ninja-debug",
            "displayName": "Windows x64 Debug",
            "description": "Default build using Ninja generator",
            "inherits": [
                "default-x64-windows-ninja"
            ],
            "cacheVariables": {
                "CMAKE_BUILD_TYPE": "Debug"
            }
        },
        {
            "name": "windows-x64-ninja-release",
            "displayName": "Windows x64 Release",
            "description": "Default build using Ninja generator",
            "inherits": [
                "default-x64-windows-ninja"
            ],
            "cacheVariables": {
                "CMAKE_BUILD_TYPE": "Release"
            }
        }
    ]
}
@andreeis
Copy link
Contributor

andreeis commented Jun 9, 2021

What is the cmake command generated by the extension when configuring? Set "cmake.loggingLevel" to "Debug" in your .vscode/settings.json and share with us the "CMake/Build" output channel.
Also, if you turn presets off, do you have the same problem? If not, can you share that "CMake/Build" output channel content as well?

@andreeis
Copy link
Contributor

andreeis commented Jun 9, 2021

First thing I notice is that you define CMAKE_BUILD_TYPE instead of CMAKE_CONFIGURATION_TYPES for "Ninja Multi-Config" generator. I am not done analyzing this end to end, but in the meantime you can review The Ninja Multi-Config Documentation to double check your presets (especially the cache variables).

@Zingam
Copy link
Contributor Author

Zingam commented Jun 9, 2021

@andreeis I'm so sorry that's really embracing. I was experimenting and changed my presets file and I didn't notice I did set Ninja Multi Config

{
    "version": 2,
    "cmakeMinimumRequired": {
        "major": 3,
        "minor": 20,
        "patch": 0
    },
    "configurePresets": [
        {
            "name": "default",
            "hidden": true,
            "binaryDir": "${sourceDir}/../../__build/${presetName}",
            "cacheVariables": {
                "CMAKE_INSTALL_PREFIX": "${sourceDir}/../../__install/${presetName}"
            }
        },
        {
            "name": "default-x64-windows-ninja",
            "inherits": [
                "default"
            ],
            "generator": "Ninja",
            "architecture": {
                "value": "x64",
                "strategy": "external"
            },
            "vendor": {
                "microsoft.com/VisualStudioSettings/CMake/1.0": {
                    "hostOS": [
                        "Windows"
                    ]
                }
            }
        }
    ]
}

I opened the folder with the above preset. On configure I got an error message that compiler was not configured. So I executed:

Select [Scan for Compilers] to search for C/C++ compilers on your machine.

The clicked on Configure All Projects in the CMake pane.

[main] Configuring folder: REngine 
[main] Saving open files before configure/build
[driver] Run _refreshExpansions
[driver] Run _refreshExpansions cb
[driver] Start configure 
[driver] Runnnig pre-configure checks and steps
[driver] Run _refreshExpansions
[driver] Run _refreshExpansions cb
[cmakefileapi-driver] Configuring using preset
[cmakefileapi-driver] Invoking CMake C:\Program Files\CMake\bin\cmake.EXE with arguments ["-DCMAKE_INSTALL_PREFIX=x:/GitHub/REngine/REngine/REngine/../../__install/default-x64-windows-ninja","-Hx:/GitHub/REngine/REngine/REngine","-Bx:/GitHub/REngine/__build/default-x64-windows-ninja","-G","Ninja"]
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" -DCMAKE_INSTALL_PREFIX=x:/GitHub/REngine/REngine/REngine/../../__install/default-x64-windows-ninja -Hx:/GitHub/REngine/REngine/REngine -Bx:/GitHub/REngine/__build/default-x64-windows-ninja -G Ninja
[cmake] CMake version: 3.20.0
[cmake] -- The C compiler identification is MSVC 19.29.30037.0
[cmake] -- The CXX compiler identification is MSVC 19.29.30037.0
[cmake] -- Detecting C compiler ABI info
[cmake] -- Detecting C compiler ABI info - failed
[cmake] -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe
[cmake] -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe - broken
[cmake] CMake Error at C:/Program Files/CMake/share/cmake-3.20/Modules/CMakeTestCCompiler.cmake:66 (message):
[cmake]   The C compiler
[cmake] 
[cmake]     "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe"
[cmake] 
[cmake]   is not able to compile a simple test program.
[cmake] 
[cmake]   It fails with the following output:
[cmake] 
[cmake]     Change Dir: X:/GitHub/REngine/__build/default-x64-windows-ninja/CMakeFiles/CMakeTmp
[cmake]     
[cmake]     Run Build Command(s):C:/PROGRA~2/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe cmTC_f4e5b && [1/2] Building C object CMakeFiles\cmTC_f4e5b.dir\testCCompiler.c.obj
[cmake]     [2/2] Linking C executable cmTC_f4e5b.exe
[cmake]     FAILED: cmTC_f4e5b.exe 
[cmake]     cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_f4e5b.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\10.0.19041.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\10.0.19041.0\x64\mt.exe --manifests  -- "C:\PROGRA~2\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\bin\Hostx64\x64\link.exe" /nologo CMakeFiles\cmTC_f4e5b.dir\testCCompiler.c.obj  /out:cmTC_f4e5b.exe /implib:cmTC_f4e5b.lib /pdb:cmTC_f4e5b.pdb /version:0.0 /machine:x64  /debug /INCREMENTAL /subsystem:console  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
[cmake]     LINK Pass 1: command "C:\PROGRA~2\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_f4e5b.dir\testCCompiler.c.obj /out:cmTC_f4e5b.exe /implib:cmTC_f4e5b.lib /pdb:cmTC_f4e5b.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\cmTC_f4e5b.dir/intermediate.manifest CMakeFiles\cmTC_f4e5b.dir/manifest.res" failed (exit code 1104) with the following output:
[cmake]     LINK : fatal error LNK1104: cannot open file 'kernel32.lib'
[cmake]     ninja: build stopped: subcommand failed.
[cmake]     
[cmake]     
[cmake] 
[cmake]   
[cmake] 
[cmake]   CMake will not be able to correctly generate this project.
[cmake] Call Stack (most recent call first):
[cmake]   CMakeLists.txt:13 (project)
[cmake] 
[cmake] 
[cmake] -- Configuring incomplete, errors occurred!
[cmake] See also "X:/GitHub/REngine/__build/default-x64-windows-ninja/CMakeFiles/CMakeOutput.log".
[cmake] See also "X:/GitHub/REngine/__build/default-x64-windows-ninja/CMakeFiles/CMakeError.log".
[extension] [1735] cmake.configureAll finished (returned 1)

@Zingam
Copy link
Contributor Author

Zingam commented Jun 9, 2021

The Hello World toy source code:
REngine.zip

@Zingam
Copy link
Contributor Author

Zingam commented Jun 9, 2021

CMake: Configure
To configure the project, run CMake: Configure from the command palette. This is the same as running cmake --preset from the command line, where is the name of the active Configure Preset.

[!NOTE] If you're a windows developer, you must open Visual Studio Code from a developer command prompt. Or, run the CMake: Scan for Compilers command before the CMake Tools extension can detect build tools (CMake, Ninja) that are installed with Visual Studio.

What I understood from the above text is that it should have worked after I executed Scan for Compilers command.

And this which I added with the help of the command palette works:

        {
            "name": "vs2019",
            "displayName": "Visual Studio Community 2019 Release - amd64",
            "description": "Using compilers for Visual Studio 16 2019 (x64 architecture)",
            "inherits": [
                "default"
            ],
            "generator": "Visual Studio 16 2019",
            "toolset": "host=x64",
            "architecture": "x64",
            "cacheVariables": {
                "CMAKE_BUILD_TYPE": "Debug"
            }
        }

@Zingam
Copy link
Contributor Author

Zingam commented Jun 9, 2021

I got a success when I launched from the VS developer prompt, deleted the build directory and reconfigured.
Without deleting the build directory the application wouldn't launch.

@bobbrow
Copy link
Member

bobbrow commented Jun 10, 2021

Can you add:

            "CMAKE_C_COMPILER": "cl.exe",
            "CMAKE_CXX_COMPILER": "cl.exe",

to your cacheVariables? The VS environment is not added unless we detect you are using cl with Ninja. I think CMake picks this by default on Windows, but it seems we didn't do that. We might want to make a similar default though, since I've seen two people hit this problem so far.

@Zingam
Copy link
Contributor Author

Zingam commented Jun 10, 2021

This works, thank you. I expected that this is covered automatically by adding:

            "vendor": {
                "microsoft.com/VisualStudioSettings/CMake/1.0": {
                    "hostOS": [
                        "Windows"
                    ]
                }
            }

Shouldn't we have the option to select the compiler in a similar fashion as when using kits?
Or some vendor map magic to set a compiler instead of messing with cache variables directly? We could have a few predefined values or is this out of scope?

[main] Configuring folder: REngine 
[main] Saving open files before configure/build
[driver] Run _refreshExpansions
[driver] Run _refreshExpansions cb
[driver] Start configure 
[driver] Runnnig pre-configure checks and steps
[driver] Run _refreshExpansions
[driver] Run _refreshExpansions cb
[cmakefileapi-driver] Configuring using preset
[cmakefileapi-driver] Invoking CMake C:\Program Files\CMake\bin\cmake.EXE with arguments ["-DCMAKE_C_COMPILER=cl.exe","-DCMAKE_CXX_COMPILER=cl.exe","-DCMAKE_INSTALL_PREFIX=x:/GitHub/REngine/REngine/REngine/../../__install/default-x64-windows-ninja","-Hx:/GitHub/REngine/REngine/REngine","-Bx:/GitHub/REngine/__build/default-x64-windows-ninja","-G","Ninja"]
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe -DCMAKE_INSTALL_PREFIX=x:/GitHub/REngine/REngine/REngine/../../__install/default-x64-windows-ninja -Hx:/GitHub/REngine/REngine/REngine -Bx:/GitHub/REngine/__build/default-x64-windows-ninja -G Ninja
[cmake] CMake version: 3.20.0
[cmake] -- The C compiler identification is MSVC 19.29.30037.0
[cmake] -- The CXX compiler identification is MSVC 19.29.30037.0
[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.30037/bin/Hostx86/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.30037/bin/Hostx86/x64/cl.exe - skipped
[cmake] -- Detecting CXX compile features
[cmake] -- Detecting CXX compile features - done
[cmake] -- Configuring done
[cmake] -- Generating done
[cmake] -- Build files have been written to: X:/GitHub/REngine/__build/default-x64-windows-ninja
[cmakefileapi-parser] Read reply folder: x:\GitHub\REngine\__build\default-x64-windows-ninja\.cmake\api\v1\reply
[cmakefileapi-parser] Found index files: ["cache-v2-5f9adc5f9057b91f6fa0.json","codemodel-v2-bd5e7502c8734a839ac7.json","index-2021-06-10T18-11-19-0293.json","target-StartupApp-Debug-a023933b840ec7cf7d23.json","toolchains-v1-9581a8174d2df1a2c8ed.json"]
[cache] Reading CMake cache file x:/GitHub/REngine/__build/default-x64-windows-ninja/CMakeCache.txt
[cache] Parsing CMake cache string
[extension] [9056] cmake.cleanConfigureAll finished (returned 0)

@Zingam
Copy link
Contributor Author

Zingam commented Jun 10, 2021

BTW. In a few places I notice the word "kit" where with the current command "Scan for compilers", "compiler" may be a more appropriate word, like in the compiler quick pick, the scanning message, etc.

@bobbrow
Copy link
Member

bobbrow commented Jun 10, 2021

@Zingam please feel free to open issues or send us a PR for the cases where "kit" is incorrectly used.

@esweet431 What do you think about us defaulting to pick "cl.exe" by default on Windows if the generator is "Ninja" and the CMAKE_CXX_COMPILER variable is not set? Is CMake or VS doing anything fancy here?

@Zingam
Copy link
Contributor Author

Zingam commented Jun 10, 2021

Can we have the shortcut version like with cl.exe for the embedded Clang instead of writing the full path:

            "cacheVariables": {
                "CMAKE_C_COMPILER": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/Llvm/x64/bin/clang.exe",
                "CMAKE_CXX_COMPILER": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/Llvm/x64/bin/clang.exe",
                "CMAKE_RC_COMPILER": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/Llvm/x64/bin/llvm-rc.exe"
            }

@Zingam
Copy link
Contributor Author

Zingam commented Jun 11, 2021

What could be the reason why the above "clang.exe" configures but "clang-cl.exe" fails:

            "cacheVariables": {
                "CMAKE_C_COMPILER": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/Llvm/x64/bin/clang-cl.exe",
                "CMAKE_CXX_COMPILER": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/Llvm/x64/bin/clang-cl.exe",
                "CMAKE_RC_COMPILER": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/Llvm/x64/bin/llvm-rc.exe"
            }

[main] Configuring folder: REngine
[main] Saving open files before configure/build
[driver] Run _refreshExpansions
[driver] Run _refreshExpansions cb
[driver] Start configure
[driver] Runnnig pre-configure checks and steps
[driver] Run _refreshExpansions
[driver] Run _refreshExpansions cb
[cmakefileapi-driver] Configuring using preset
[cmakefileapi-driver] Invoking CMake C:\Program Files\CMake\bin\cmake.EXE with arguments ["-DCMAKE_C_COMPILER=C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/Llvm/x64/bin/clang-cl.exe","-DCMAKE_CXX_COMPILER=C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/Llvm/x64/bin/clang-cl.exe","-DCMAKE_RC_COMPILER=C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/Llvm/x64/bin/llvm-rc.exe","-DCMAKE_INSTALL_PREFIX=x:/GitHub/REngine/REngine/REngine/../../__install/user-windows-x64-ninja-clang-cl-cache","-Hx:/GitHub/REngine/REngine/REngine","-Bx:/GitHub/REngine/__build/user-windows-x64-ninja-clang-cl-cache","-G","Ninja"]
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" "-DCMAKE_C_COMPILER=C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/Llvm/x64/bin/clang-cl.exe" "-DCMAKE_CXX_COMPILER=C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/Llvm/x64/bin/clang-cl.exe" "-DCMAKE_RC_COMPILER=C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/Llvm/x64/bin/llvm-rc.exe" -DCMAKE_INSTALL_PREFIX=x:/GitHub/REngine/REngine/REngine/../../__install/user-windows-x64-ninja-clang-cl-cache -Hx:/GitHub/REngine/REngine/REngine -Bx:/GitHub/REngine/__build/user-windows-x64-ninja-clang-cl-cache -G Ninja
[cmake] CMake version: 3.20.0
[cmake] -- The C compiler identification is Clang 11.0.0 with MSVC-like command-line
[cmake] -- The CXX compiler identification is Clang 11.0.0 with MSVC-like command-line
[cmake] -- Detecting C compiler ABI info
[cmake] -- Detecting C compiler ABI info - failed
[cmake] -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/Llvm/x64/bin/clang-cl.exe
[cmake] -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/Llvm/x64/bin/clang-cl.exe - broken
[cmake] CMake Error at C:/Program Files/CMake/share/cmake-3.20/Modules/CMakeTestCCompiler.cmake:66 (message):
[cmake] The C compiler
[cmake]
[cmake] "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/Llvm/x64/bin/clang-cl.exe"
[cmake]
[cmake] is not able to compile a simple test program.
[cmake]
[cmake] It fails with the following output:
[cmake]
[cmake] Change Dir: X:/GitHub/REngine/__build/user-windows-x64-ninja-clang-cl-cache/CMakeFiles/CMakeTmp
[cmake]
[cmake] Run Build Command(s):C:/PROGRA1/CMake/bin/ninja.exe cmTC_9a3f8 && [1/2] Building C object CMakeFiles\cmTC_9a3f8.dir\testCCompiler.c.obj
[cmake] [2/2] Linking C executable cmTC_9a3f8.exe
[cmake] FAILED: cmTC_9a3f8.exe
[cmake] cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_9a3f8.dir --rc="C:\PROGRA
2\Microsoft Visual Studio\2019\Community\VC\Tools\Llvm\x64\bin\llvm-rc.exe" --mt=C:\PROGRA2\WI3CF21\10\bin\10.0.19041.0\x86\mt.exe --manifests -- "C:\PROGRA2\Microsoft Visual Studio\2019\Community\VC\Tools\Llvm\x64\bin\lld-link.exe" /nologo CMakeFiles\cmTC_9a3f8.dir\testCCompiler.c.obj /out:cmTC_9a3f8.exe /implib:cmTC_9a3f8.lib /pdb:cmTC_9a3f8.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
[cmake] LINK Pass 1: command "C:\PROGRA
2\Microsoft Visual Studio\2019\Community\VC\Tools\Llvm\x64\bin\lld-link.exe /nologo CMakeFiles\cmTC_9a3f8.dir\testCCompiler.c.obj /out:cmTC_9a3f8.exe /implib:cmTC_9a3f8.lib /pdb:cmTC_9a3f8.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\cmTC_9a3f8.dir/intermediate.manifest CMakeFiles\cmTC_9a3f8.dir/manifest.res" failed (exit code 1) with the following output:
[cmake] lld-link: error: could not open 'kernel32.lib': no such file or directory
[cmake] lld-link: error: could not open 'user32.lib': no such file or directory
[cmake] lld-link: error: could not open 'gdi32.lib': no such file or directory
[cmake] lld-link: error: could not open 'winspool.lib': no such file or directory
[cmake] lld-link: error: could not open 'shell32.lib': no such file or directory
[cmake] lld-link: error: could not open 'ole32.lib': no such file or directory
[cmake] lld-link: error: could not open 'oleaut32.lib': no such file or directory
[cmake] lld-link: error: could not open 'uuid.lib': no such file or directory
[cmake] lld-link: error: could not open 'comdlg32.lib': no such file or directory
[cmake] lld-link: error: could not open 'advapi32.lib': no such file or directory
[cmake] lld-link: error: could not open 'msvcrtd.lib': no such file or directory
[cmake] lld-link: error: could not open 'oldnames.lib': no such file or directory
[cmake] ninja: build stopped: subcommand failed.
[cmake]
[cmake]
[cmake]
[cmake]
[cmake]
[cmake] CMake will not be able to correctly generate this project.
[cmake] Call Stack (most recent call first):
[cmake] CMakeLists.txt:13 (project)
[cmake]
[cmake]
[cmake] -- Configuring incomplete, errors occurred!
[cmake] See also "X:/GitHub/REngine/__build/user-windows-x64-ninja-clang-cl-cache/CMakeFiles/CMakeOutput.log".
[cmake] See also "X:/GitHub/REngine/__build/user-windows-x64-ninja-clang-cl-cache/CMakeFiles/CMakeError.log".
[extension] [4308] cmake.configureAll finished (returned 1)

There is no such issue in VS2019 with the same preset settings.

@bobbrow
Copy link
Member

bobbrow commented Jun 22, 2021

Two issues here:

  1. We should support "clang.exe" and "clang-cl.exe" as the CMAKE_C|CXX|RC_COMPILER without needing a full path (if we don't already)
  2. We should make sure clang-cl is functioning properly.

@bobbrow bobbrow changed the title How to setup CMake presets with Ninja on Windows to target Windows? Allow for clang compilers to be set in presets without full path Jun 22, 2021
@bobbrow bobbrow added this to the 1.8.0 milestone Jun 22, 2021
@elahehrashedi elahehrashedi modified the milestones: 1.8.0, 1.9.0 Jul 13, 2021
@andreeis
Copy link
Contributor

This fix is included in the 1.9.0 CMake Tools release. Please upgrade your extension in VSCode and let us know if you encounter any other issues.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants