Skip to content

Conversation

@jcm93
Copy link
Contributor

@jcm93 jcm93 commented Nov 26, 2024

Random fix from CMake work.

Precompiled headers under CMake are currently buggy and unreliable on Windows, largely because the precompiled <ares/ares.hpp> header includes <ares/resource/resource.hpp>, which is generated by sourcery as part of the build process.

While sourcery will almost never meaningfully change the contents of this resource.hpp file, Windows may insert its own line endings depending on the user's environment, and despite enforcing uniform line endings as part of our .gitattributes file, some compilers will throw a fit about the precompiled header being modified from underneath it.

Since the resource.hpp file is simple, short, and not included in that many places, we can just refactor it out of <ares/ares.hpp> without issue, and precompiled headers will work again regardless of system line ending convention or environment.

Tested to build locally on macOS; CI run definitely recommended.

@LukeUsher LukeUsher merged commit 687bfe8 into ares-emulator:master Dec 2, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants