cmake: fix compile warnings for clang-cl - #15337
Closed
zjyhjqs wants to merge 3 commits into
Closed
Conversation
Contributor
|
Analysis of PR #15337 at 0019d285: Test 987 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Note that this test has failed in 2 different CI jobs (the link just goes to one of them). Generated by Testclutch |
vszakats
reviewed
Oct 19, 2024
…OMPILE_OPTIONS` to prevent passing to tests)
vszakats
approved these changes
Oct 19, 2024
Member
|
Thanks @zjyhjqs! |
vszakats
added a commit
that referenced
this pull request
Oct 24, 2024
vszakats
added a commit
to vszakats/curl
that referenced
this pull request
Oct 25, 2024
pps83
pushed a commit
to pps83/curl
that referenced
this pull request
Apr 26, 2025
clang-cl is an alternative command-line interface to Clang, designed for compatibility with the Visual C++ compiler, `cl.exe`: https://clang.llvm.org/docs/UsersManual.html#clang-cl The way to test clang-cl in CMake: - `CMAKE_<LANGUAGE>_COMPILER_ID`: "Clang" - `CMAKE_<LANGUAGE>_COMPILER_FRONTEND_VARIANT`: "MSVC" Note: `CMAKE_<LANGUAGE>_COMPILER_FRONTEND_VARIANT` was introduced since CMake 3.14, but the variable `MSVC` works fine here. https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_FRONTEND_VARIANT.html https://cmake.org/cmake/help/latest/variable/MSVC.html Closes curl#15337
pps83
pushed a commit
to pps83/curl
that referenced
this pull request
Apr 26, 2025
- use CMake 3.12 syntax when available, in clang-cl branch. Follow-up to e89491e curl#15337 - rename internal variables to underscore-lowercase. Follow-up to d8de480 curl#14571 - update comment. Closes curl#15404
pps83
pushed a commit
to pps83/curl
that referenced
this pull request
Apr 26, 2025
Follow-up to e89491e curl#15337 Closes curl#15411
This file contains hidden or 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
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.
clang-cl is an alternative command-line interface to Clang, designed for compatibility with the Visual C++ compiler, cl.exe.
The way to test clang-cl in CMake:
CMAKE_<LANGUAGE>_COMPILER_ID: "Clang"CMAKE_<LANGUAGE>_COMPILER_FRONTEND_VARIANT: "MSVC"Note: CMAKE_<LANGUAGE>_COMPILER_FRONTEND_VARIANT) was introduced since CMake 3.14, but the variable MSVC works fine here.
To pass the GNU style compile options to cl frontend, prefix
/clang:or-Xclangis required to be prepended.COMPILE_OPTIONShere is easier to be transformed, because it is a list, not likeCMAKE_<LANG>_FLAGSis just a string.