-
Notifications
You must be signed in to change notification settings - Fork 991
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
fix meson cpp_std for VS2019 and 2022 c++20. #13450
fix meson cpp_std for VS2019 and 2022 c++20. #13450
Conversation
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.
CI failed, but I think it is related to the comment.
If you can try to run the tests locally, it is:
pytest conans/test/unittests/client/build/cpp_std_flags_test.py::CompilerFlagsTest::test_visual_cppstd_flags -s
conan/tools/build/flags.py
Outdated
return {"14": v14, "17": v17, "20": v20, "23": v23}.get(str(cppstd), None) | ||
|
||
def _cppstd_msvc(visual_version, cppstd): | ||
flag = cppstd_msvc_flag(visual_version, cppstd).get(str(cppstd), None) |
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.
It seems this is redundant?
flag = cppstd_msvc_flag(visual_version, cppstd).get(str(cppstd), None) | |
flag = cppstd_msvc_flag(visual_version, cppstd) |
fe43a15
to
3bbf28c
Compare
Note meson 1.0.1 is required for it to accept c++20 with clang-cl.
3bbf28c
to
e1df479
Compare
Sorry yeah that first attempt was nonsense... Hopefully good now. |
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, thanks very much for contributing this, merging it for next 2.0.3
Changelog: Fix: Generate
cpp_std=vc++20
for c++20 with meson with VS2019 and VS2022, rather thanvc++latest
.Docs: Omit
Fixes #13424
Note meson 1.0.1 is required for it (meson) to accept
vc++20
with clang-cl.Given the comment about
_msvc_supported_cppstd
in the issue, I've made a slight change from the version there. It looks like_msvc_supported_cppstd
reports VS2019 as only supporting up to c++20, so I've kept c++23 as VS2022 only in this version.Thanks