-
Notifications
You must be signed in to change notification settings - Fork 49
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
Compiling broken on clang-cl #18
Comments
This is a rather esoteric part of CMake (https://stackoverflow.com/a/10055571/1806760). Likely the default condition for cmkr is not strict enough. You can fix this locally in your project by overwriting the [conditions]
clang = "CMAKE_CXX_COMPILER_ID MATCHES \"Clang\" AND NOT CMAKE_CXX_SIMULATE_ID" |
Also as a general note you shouldn't set CMake's "solution" is to use presets for this and manually specify the |
Should be fixed in cmkr |
You’re awesome, thank you so much for the information and cmkr changes! I’ll be giving it a try soon. |
While testing #13 I've ran into the issue where the library refuses to build under
clang-cl
. It seems like commit 3393ced is the cause of it.The error seems to stem from the use of
-pedantic
:The other thing I noticed is clang-cl gets picked up as both "msvc" and "clang" here, so both compile flags are used from these sections.
This is most likely just the fault of cmkr not having great predefined conditions: https://cmkr.build/cmake-toml/#predefined-conditions
The final flags on my compiler look like this (this is only from
Builder.cpp
but it happens for all source files):From what I know, clang flags passed to clang-cl must be passed like so:
/clang:<flag>
. However, It seems like most flags in the MSVC section would work fine. The only ones I cant find in the documentation are:/permissive
and/w<warning id>
. Either way, I don't think it's ideal that both MSVC and clang-cl flags are being mixed on the command line in this case since they're redundant.I'm sure theres some work around for this but perhaps cmkr could have better predefined compiler detection conditions?
The text was updated successfully, but these errors were encountered: