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

Premake: replaced buildoptions -std=c++11 with flags C++11 #469

Closed
wants to merge 1 commit into from

Conversation

hsandt
Copy link

@hsandt hsandt commented Aug 20, 2017

On Linux at least, usage of C++11 is not recognized when premake just uses buildoptions "", causing errors during make such as:

../../Box2D/Collision/Shapes/b2ChainShape.h:99:15: error: ‘nullptr’ was not declared in this scope
  m_vertices = nullptr;

The issue may be related to premake/premake-core#770 for which the solution is to use cppdialect, only available starting premake 5 alpha 12 (currently WIP). For now, I suggest this fix, although redundant and not as elegant as filters.

I also mention the fix on Stack Overflow.

@hsandt
Copy link
Author

hsandt commented Sep 16, 2017

With alpha12 of premake, I got this:

** Warning: the flags value C++11 has been deprecated and will be removed.
Use cppdialect "C++11" instead
@/.../Box2D-repo/Box2D/premake5.lua(25)

Therefore, I will close this PR and make a new one for alpha12 using cppdialect (I could juste update the PR, but since I made the PR directly on master it may interfere with other changes I make on master, so I prefer using a dedicated branch).

@hsandt hsandt closed this Sep 16, 2017
@hsandt
Copy link
Author

hsandt commented Sep 16, 2017

OK, I realized a bug on premake5-alpha12 makes cppdialect fails on OSX (it writes std=C++11 instead of std=c++11). I will send them a PR, but until then, the flags solution works, even though deprecated. I reopen this PR so that, at least, we have a solution to nullptr and other bugs in the meantime.

@hsandt hsandt reopened this Sep 16, 2017
@hsandt
Copy link
Author

hsandt commented Sep 20, 2017

PR to fix cppdialect on OSX on the way: premake/premake-core#897

@hsandt
Copy link
Author

hsandt commented Oct 14, 2017

PR accepted. Will send another PR with cppdialect.

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.

1 participant