Skip to content

Fix test and example incompatibility with ARM Macs#1960

Merged
eXpl0it3r merged 1 commit into
SFML:2.6.xfrom
ChrisThrasher:mac-compatibility
Jan 8, 2022
Merged

Fix test and example incompatibility with ARM Macs#1960
eXpl0it3r merged 1 commit into
SFML:2.6.xfrom
ChrisThrasher:mac-compatibility

Conversation

@ChrisThrasher

@ChrisThrasher ChrisThrasher commented Jan 8, 2022

Copy link
Copy Markdown
Member

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 left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

@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
@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

None yet

Development

Successfully merging this pull request may close these issues.

2 participants