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

Fix test and example incompatibility with ARM Macs #1960

Merged
merged 1 commit into from Jan 8, 2022

Conversation

ChrisThrasher
Copy link
Member

@ChrisThrasher ChrisThrasher commented Jan 8, 2022

Description

This includes a few commits from the master branch which fix issues with compiling the examples and tests on Macs, particle Apple Silicon Macs. For the sake of having simple cherry-picks without conflicts I included a commit that reduces the number of times CatchMain.cpp is compiled which is also a nice benefit since that speeds up compile times significantly.

See #1918, #1898, and #1949 for more discussion about these commits.

Tasks

  • Tested on Linux
  • Tested on Windows
  • Tested on macOS
  • Tested on iOS
  • Tested on Android

@eXpl0it3r eXpl0it3r added this to Discussion in SFML 2.6.0 via automation Jan 8, 2022
@eXpl0it3r eXpl0it3r moved this from Discussion to Review & Testing in SFML 2.6.0 Jan 8, 2022
Copy link
Member

@eXpl0it3r eXpl0it3r left a comment

Choose a reason for hiding this comment

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

Can't really update Catch on the 2.6.x branch as it requires C++17 and also bumps the CMake version.

@ChrisThrasher
Copy link
Member Author

Catch2 v2 uses C++11, not 17 but now I remember that SFML 2.x uses C++03 so it doesn't matter either way. I expected that to have broken the CI pipeline but everything is still passing. Not sure what to make of that.

The latest commit in the Catch2 1.x release series doesn't build for Arm Macs so I suppose the tests will always be broken for Arm Macs. That's too bad. I'll keep the example fix in here since that's still a small compatibility improvement.

@ChrisThrasher
Copy link
Member Author

it requires C++17

Are you referring to this line in test/CMakeLists.txt?

target_compile_features(sfml-test-main PRIVATE cxx_std_17)

I forgot this was in here but I use Catch2 v2.13.7 in many other C++11 projects without issue. I tried removing that and my local build still works. Either way it's not a huge deal so I'll just keep those commits out of this PR.

@eXpl0it3r
Copy link
Member

Don't exactly see an easy solution for this either. I want to keep SFML 2.x C++03 compatible, if it means that tests can't be executed on a newer platform, then I find this a better trade off, than requiring all the other platforms to support C++11.

SFML 2.6 will be the last SFML 2.x version (excluding potential bugfix releases), so there shouldn't really be a big issue not having tests executed on macOS ARM

SFML 2.6.0 automation moved this from Review & Testing to Ready Jan 8, 2022
@eXpl0it3r eXpl0it3r added this to the 2.6 milestone Jan 8, 2022
@eXpl0it3r eXpl0it3r merged commit 70e0ad2 into SFML:2.6.x Jan 8, 2022
SFML 2.6.0 automation moved this from Ready to Done Jan 8, 2022
@ChrisThrasher ChrisThrasher deleted the mac-compatibility branch January 8, 2022 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
SFML 2.6.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants