-
Notifications
You must be signed in to change notification settings - Fork 993
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
[feature] can't specify c++20 with meson generator #13424
Comments
Thanks for your report I think that mapping do not affect if compiler == "msvc":
return _vs_cppstd_map.get(cppstd) But |
Well ... I'd say yes and no :) I really meant the But as for the subject of this issue, yeah proper Thanks |
You might want to read https://blog.conan.io/2022/10/13/Different-flavors-Clang-compiler-Windows.html. For Conan the |
I think I'm derailing the subject of my own issue! Yeah I've seen that but it's still not quite there for me without some extra work. The meson native file gets:
Which meson isn't happy with with the vs backend (fails setup); should both be Adding to the profile:
Seems OK but should surely be automatic? I guess https://github.com/conan-io/conan/blob/release/2.0/conan/tools/meson/toolchain.py#L170-L178 could be a bit smarter to make it bullet proof? Anyway, I could well be missing something obvious so wasn't going to mention it to avoid looking silly before I'd looked into it further :) Oh well. But yeah if even with targeting Cheers |
You are right that there are some cases, specifically with other build systems that might need some extra tuning, and we are aware that specifically using the In the meantime, what you are doing with We would need to consider this a bit from perspective, not only for Meson, but potentially other tools too. Annotating this for investigation. |
OK sounds good, thanks. How about the
|
Sure that would be great. There is already some per-compiler definition of what cppstd are supported in Indeed if meson now allows other cppstd definition, it would be good to updated (still, it seems only for For processing the compiler version, there is also some existing code in We would prefer not having to parameterize the Meson version, there is no input configuration for it. We don't even model the CMake version, and work with a baseline of CMake 3.15, and some features we just assume a certain version. But we don't do conditionals based on the CMake version to do different things. That makes things too complicated and difficult to maintain. |
OK here's an initial attempt: lukester1975@3b95565 I'm not really a python person so please be gentle 😀 Should I move this to a PR?
Thanks |
Yes, did a quick review, added a comment, but I'd say it looks good, I think it can be moved to a PR, many thanks! |
FYI I noticed a couple more
Speaking of which, whilst I was looking around to see how conan/conan/tools/cmake/toolchain/blocks.py Lines 83 to 104 in ba12bd1
Could bin the if on 104 presumably? Thanks |
Thanks for noticing. Indeed there are a couple of details to polish regarding the I'd say focus this on getting the meson for |
What is your suggestion?
/std:c++20
is supported bycl
since VS 2019 16.11 :and clang-cl since 13.
c++latest
is far from ideal as it turns on 23 features (and generates a ton of deprecation warnings). An additional consideration is that only meson 1.0.1 supportsc++20
forclang-cl
. So ultimatelyis somewhat simplistic, as ideally it's a function of compiler, compiler version and meson version... But maybe a trivial change to
vc++20
is pragmatic?Thanks
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: