Skip to content
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 C++20 cppdialect for C++ projects #1460

Merged
merged 2 commits into from
Jun 7, 2020
Merged

Add C++20 cppdialect for C++ projects #1460

merged 2 commits into from
Jun 7, 2020

Conversation

nickclark2016
Copy link
Member

@nickclark2016 nickclark2016 commented Jun 2, 2020

What does this PR do?

This PR introduces the C++20 standard dialect option to the cppdialect. It sets the corresponding standard flag for MSC, Make, and XCode.

cppdialect Generator Compiler Value
c++17 MSC /std:c++17
c++2a gmake/gmake2 -std=c++2a
c++20 gmake/gmake2 -std=c++20
c++20 MSC /std:c++latest
c++20 XCode -std=c++2a
gnu++2a gmake/gmake2 -std=gnu++2a
gnu++20 gmake/gmake2 -std=gnu++20
gnu++20 XCode -std=gnu++2a

How does this PR change Premake's behavior?

This changes the behavior of MSC's C++17 dialect value from /std:latest to /std:c++17, which is supported in Visual Studio 2019. When running Premake with cppdialect c++20, c++2a, gnu++20, or gnu++2a, this adds the appropriate standard revision to the compilation.

Anything else we should know?

Further down the line, the C++ dialect flags for Xcode should be changed to reflect updates to Apple LLVM's compiler flags. This is out of scope of this PR though.

* Update vcxproj.lua
* Update dmd.lua
* Update ldc.lua
* Update gcc.lua
* Update test_gcc.lua
Copy link
Member

@starkos starkos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what's up with the stalled Travis CI test, I'll see if I can give it a kick…

@nickclark2016
Copy link
Member Author

Thanks for taking a look at the CI build. I've been wondering why it was stalled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants