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

wrong platform toolset #451

Closed
aregtech opened this issue Nov 18, 2024 · 0 comments · Fixed by #452
Closed

wrong platform toolset #451

aregtech opened this issue Nov 18, 2024 · 0 comments · Fixed by #452
Assignees
Labels
bug Something isn't working

Comments

@aregtech
Copy link
Owner

Describe:

Configuring CMake for Clang under Windows with following command

cmake -B ./product/cache/msvc-clang-x86 -DAREG_PROCESSOR=x86 -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl

When configuration finished, the generated project files (.vcxproj) contain wrong toolset:

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseOfMfc>false</UseOfMfc>
    <CharacterSet>Unicode</CharacterSet>
    <PlatformToolset>v143</PlatformToolset>
  </PropertyGroup>

The specified <PlatformToolset>v143</PlatformToolset> should be <PlatformToolset>ClangCl</PlatformToolset>. In addition, I get compilation error because the MSVC does not understand Clang specific compiler option to disable warnings like -Wno-c++98-compat.

It differs if configure with command:

cmake -B ./product/cache/msvc-clang-x86 -DAREG_COMPILER_FAMILY=llvm -DAREG_PROCESSOR=x86

This call generates correct PlatformToolset entry.

Expected:

Two commands:

cmake -B ./product/cache/msvc-clang-x86 -DAREG_PROCESSOR=x86 -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl

and

cmake -B ./product/cache/msvc-clang-x86 -DAREG_COMPILER_FAMILY=llvm -DAREG_PROCESSOR=x86

should generate absolutely identical project files to build 32-bit binaries and the PlatformToolset should be ClangCl

@aregtech aregtech added the bug Something isn't working label Nov 18, 2024
@aregtech aregtech self-assigned this Nov 18, 2024
@aregtech aregtech linked a pull request Nov 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

1 participant