This takes a 4 second configuration time for the entire project with
examples and tests and turns that into 3! Whopping 25% reduction in
configuration time. This effect is likely to be even larger on machines
without exceptionally good internet connections.
Before:
$ hyperfine 'rm -rf build && cmake --preset dev'
Benchmark 1: rm -rf build && cmake --preset dev
Time (mean ± σ): 4.076 s ± 0.130 s [User: 2.148 s, System: 1.376 s]
Range (min … max): 3.963 s … 4.321 s 10 runs
After:
$ hyperfine 'rm -rf build && cmake --preset dev'
Benchmark 1: rm -rf build && cmake --preset dev
Time (mean ± σ): 3.007 s ± 0.313 s [User: 1.061 s, System: 1.160 s]
Range (min … max): 2.783 s … 3.805 s 10 runs
Co-authored-by: binary1248 <binary1248@hotmail.com>
Out of bounds array access is undefined behavior so let's be sure
to catch potential UB in debug builds. It's too easy to accidentally
provide an invalid index to one of these public APIs.
A fun thing about runDisplayTests() is that it means that the tests
won't get run in CI on the DRM code. Technically you can run the
display tests locally when buidling with DRM so these tests will
still fail under those circumstances. Regardless I think this is a
net positive to run the tests in CI.
This is not the best default value because it imposes additional
requirements on user builds that are not strictly necessary. This
has caused many complaints in the past as people encounter build
failures that are merely due to warnings and not hard compiler
errors.
Changing this default value emakes it more likely that someone trying
to use SFML can use it without issue.
The name of the find module was changed to match the name used by
the reference implementation of Vorbis. Likely the target names were
taken from what the reference implementation names those targets.
This is a lighitly modified copy of CMake 3.27.4's FindOpenAL.cmake
module. This gives us access to the OpenAL::OpenAL target which was
not added until CMake 3.25.
https://github.com/github/gitignore/blob/main/C%2B%2B.gitignore
Our .gitignore file originated from this .gitignore template. This
template is made to be general-purpose and thus includes many things
we don't care about. We know that the SFML build won't produce files
with any of these patterns outside of the binary dir.
I alphabetized the list while I was at it.
This class hides a lot of its logic in the private section of the
classes and uses friends to access them so there is little accessible
in the public interface for testing.
The problem is that the Windows CI image hasn't yet be updated to
Clang 16. See this PR for progress on fixing it
https://github.com/actions/runner-images/pull/8134
This has been merged but we still have to wait for the changes to
propogate to all runners.
My goal is to reduce our need on sfml_find_package until it can
finally be removed. It's preferred to simply use find_package to
find 3rd party projects.
I had to add IMPORTED targets to some of our find modules so that
we could get away from using INTERFACE libraries for external code.
That also implied that our find moduels need to be installed so that
users have access to them when processing SFML's config module.
All in service of hopefully removing sfml_find_package one day since
that will simplify packaging SFML and better set us up for adopting
a package manager.