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

Detect ClangCL correctly on Visual Studio Clang builds #380

Merged
merged 1 commit into from
Mar 25, 2022

Conversation

petiaccja
Copy link
Contributor

CMake-conan currently recognizes ClangCL (Clang with cl.exe interface and MSVC ABI) as regular Clang (with GCC interface and ABI), consequently failing builds.

I added an exclusion to remove ClangCL from the "regular" Clang category and an inclusion to add ClangCL to the Visual Studio category. This works for building directly from Visual Studio, with the ClangCL toolset.

Limitations:

  • Building with Clang with GNU interface and MSVC ABI is still undefined behaviour
  • Building with Clang with cl.exe interface and GNU/MinGW ABI is still undefined (I don't know if such a flavour even exists)
  • The failure was that conan originally picked MinGW Makefiles for Clang. I suppose now it picks Visual Studio solutions. I don't suppose it's possible to build with Clang/MSVC ABI without the MSVC toolset being installed, but if it is, that might be a problem.

Just let me know how we can improve the PR or if there are other plans to resolve the issue.

@CLAassistant
Copy link

CLAassistant commented Dec 17, 2021

CLA assistant check
All committers have signed the CLA.

@czoido czoido self-assigned this Mar 25, 2022
@czoido czoido closed this Mar 25, 2022
@czoido czoido reopened this Mar 25, 2022
@czoido czoido added this to the 0.18 milestone Mar 25, 2022
@czoido
Copy link
Contributor

czoido commented Mar 25, 2022

Hi @petiaccja,
Thanks a lot for the contribution, I think this check makes sense. I have added this for the next 0.18 release.

@czoido czoido merged commit c3f119b into conan-io:develop Mar 25, 2022
@czoido czoido removed their assignment Mar 25, 2022
@petiaccja
Copy link
Contributor Author

Hi @czoido
Thanks for reviewing the PR, I hope it's going to be useful for the community :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants