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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conan_provider.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)

# Check for libc++
detect_libcxx()
if(_CONAN_IS_LIBCXX)
Expand Down
Loading