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

Add support for MinGW Clang #641

Open
wants to merge 1 commit into
base: develop2
Choose a base branch
from
Open

Conversation

valgur
Copy link
Contributor

@valgur valgur commented May 13, 2024

The C++ runtime is not detected correctly for MinGW Clang and Conan assumes the compiler to be ClangCL otherwise.

Here's a CI run after the fix: https://github.com/novatel/novatel_edie/actions/runs/9062747744/job/24897263836#step:6:87

C++ runtime is not detected correctly for MinGW Clang otherwise.
@@ -171,7 +171,7 @@ function(detect_lib_cxx LIB_CXX)
set(${LIB_CXX} "libstdc++${_CONAN_GNU_LIBSTDCXX_SUFFIX}" PARENT_SCOPE)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang")
set(${LIB_CXX} "libc++" PARENT_SCOPE)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT MSVC)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is MSVC variable defined for all flavors of Clang: LLVM/Clang external to Visual Studio installation and ClangCL within Visual Studio?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the latter, yes:

MSVC: Set to true when the compiler is some version of Microsoft Visual C++ or another compiler simulating the Visual C++ cl command-line syntax.

For an external Clang on Windows, I can only assume that it's set to false, but I have not tested this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have just checked. Even for LLVM/Clang, that doesn't use libcxx, but MSVC runtime, MSVC variable is not defined.
It seems that it would be good to improve the condition somehow, so that detection doesn't run for LLVM/Clang (MSVC backend)

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

Successfully merging this pull request may close these issues.

2 participants