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

cppdialect is not set for Xcode project #1516

Closed
cos-public opened this issue Sep 11, 2020 · 7 comments · Fixed by #1523
Closed

cppdialect is not set for Xcode project #1516

cos-public opened this issue Sep 11, 2020 · 7 comments · Fixed by #1523
Labels

Comments

@cos-public
Copy link
Contributor

cos-public commented Sep 11, 2020

What seems to be the problem?
cppdialect c++latest is not set for Xcode project.
Setting c++20 or c++2a fails with:
Error: invalid value 'c++20' for cppdialect

What have you tried so far?
Setting C++ Language Dialect from Xcode IDE works fine

How can we reproduce this?
Run premake5 xcode4 on any project with cppdialect property and look for grep -e "CLANG_CXX_LANGUAGE_STANDARD" project.pbxproj

What version of Premake are you using?
premake5 (Premake Build Script Generator) 5.0.0-alpha15
Xcode Version 11.7 (11E801a)

@cos-public cos-public added the bug label Sep 11, 2020
@cos-public cos-public changed the title cppdialect (any value) is not set for Xcode project cppdialect is not set for Xcode project Sep 11, 2020
@cos-public
Copy link
Contributor Author

And a follow-up documentation issue: https://github.com/premake/premake-core/wiki/cppdialect seems outdated since #1460 was merged

@cos-public
Copy link
Contributor Author

cos-public commented Sep 11, 2020

It seems that #1460 is not included in the recent release on github (though it was merged 3 months ago), so probably the issue can be closed for now.
However I still cannot set anything higher than c++17 on macos even on latest trunk.

@samsinsane
Copy link
Member

though it was merged 3 months ago

I don't understand what point you're trying to make here? Latest release was 5 months ago, so it's impossible to have those changes in it?

However I still cannot set anything higher than c++17 on macos even on latest trunk.

Sounds like you're on a commit before that PR, can you confirm that you're on 670935a?

@cos-public
Copy link
Contributor Author

though it was merged 3 months ago

I don't understand what point you're trying to make here? Latest release was 5 months ago, so it's impossible to have those changes in it?

Sorry, no implications there. I just wish to have some kind of nightly builds to use recent important features.

However I still cannot set anything higher than c++17 on macos even on latest trunk.

Sounds like you're on a commit before that PR, can you confirm that you're on 670935a?

I've did my best to check that I'm on the latest version of master. And the behaviour is different from alpha15 version. premake5 is no longer gives an error about unrecognised c++2a or c++20 option. It just doesn't set any 'C++ Language Dialect' value. Hope someone could check this independently.

@samsinsane
Copy link
Member

I just wish to have some kind of nightly builds to use recent important features.

Here is the latest master build, with the artifacts uploaded. You'll need to keep track of the version information, or keep up with master, if you're going to report issues about it though as we don't embed any build info into the binary.

It just doesn't set any 'C++ Language Dialect' value. Hope someone could check this independently.

Using latest, I get the following in the project file output:

CLANG_CXX_LANGUAGE_STANDARD = "c++2a";

Without seeing your script there's not much help I can provide here, you'll just need to check that you're not calling cppdialect again afterwards, or calling removeflags { "C++11" } or removeflags { "C++14" } as both of these will call cppdialect "Default", or check that it's not within a filter or within the right filter and that you've spelt everything correctly in the filter. I can't really think of anything else that would cause this to happen.

@cos-public
Copy link
Contributor Author

Here is the latest master build, with the artifacts uploaded. You'll need to keep track of the version information, or keep up with master, if you're going to report issues about it though as we don't embed any build info into the binary.
Thank you.
Using latest, I get the following in the project file output:

CLANG_CXX_LANGUAGE_STANDARD = "c++2a";

That was my fault. The option c++20 works indeed and sets the flag /std:c++2a for clang using current nightly build.
However I would like to kindly ask you to support c++2a option for Xcode as well to avoid such pitfall. As c++2a is currently supported (according to #1460) but silently ignored for Xcode. But option c++20 sets c++2a compiler flag.

@nickclark2016
Copy link
Member

I'll handle this one

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

Successfully merging a pull request may close this issue.

3 participants