-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Add ClangCL for MSVC #2268
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
t-b
force-pushed
the
feature/add-clang-cl
branch
from
July 14, 2020 13:38
ef7a603
to
68207db
Compare
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
force-pushed
the
feature/add-clang-cl
branch
from
July 14, 2020 14:02
68207db
to
25a59b5
Compare
@nlohmann Ready. |
nlohmann
approved these changes
Jul 14, 2020
There was a problem hiding this 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.
Thanks! |
🔖 Release itemThis issue/PR will be part of the next release of the library. This template helps preparing the release notes. Type
Description
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This add CI support for ClangCL using MSVC 16 2019.