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 ClangCL for MSVC #2268

Merged
merged 2 commits into from
Jul 16, 2020
Merged

Add ClangCL for MSVC #2268

merged 2 commits into from
Jul 16, 2020

Conversation

t-b
Copy link
Contributor

@t-b t-b commented Jul 14, 2020

This add CI support for ClangCL using MSVC 16 2019.

@t-b t-b requested a review from nlohmann as a code owner July 14, 2020 12:15
MS Visual Studio 2019 has builtin support for other compiler toolsets [1].

This commit adds support for compiling using LLVM/Clang 10 using Visual
Studio.

ClangCL pretends to be MSVC so the usual MSVC flags apply, see also [2].
For detecting if ClangCL is used, newer cmake verisons (>= 3.15) have
builtin support using CMAKE_CXX_COMPILER_FRONTEND_VARIANT [3], for older
ones a workaround is available using CMAKE_CXX_SIMULATE_ID [4].

[1]: https://devblogs.microsoft.com/cppblog/clang-llvm-support-in-visual-studio/
[2]: https://clang.llvm.org/docs/UsersManual.html#clang-cl
[3]: https://stackoverflow.com/a/10055571
[4]: microsoft/CMake@4fe34b2
@t-b
Copy link
Contributor Author

t-b commented Jul 14, 2020

@nlohmann Ready.

Copy link
Owner

@nlohmann nlohmann left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 25a59b5 on t-b:feature/add-clang-cl into 1a521cb on nlohmann:develop.

@nlohmann nlohmann merged commit 23c97f4 into nlohmann:develop Jul 16, 2020
@nlohmann
Copy link
Owner

Thanks!

@nlohmann
Copy link
Owner


🔖 Release item

This issue/PR will be part of the next release of the library. This template helps preparing the release notes.

Type

  • ✨ New Feature
  • 🐛 Bug Fix
  • ⚡️ Improvement
  • 🔨 Further Change
  • 🔥 Deprecated function

Description


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