These overrides existed to prevent MSVC errors related to duplicate
compiler warnings. Because we required a version of CMake older
3.15, CMake would add /W3 as a default compiler flag when using
MSVC. We then add /W4 in addition to that. Modern CMake versions
seem to deduplicate these warnings but older versions did not.
The easist fix is to raise the minimum CMake version to 3.15 which
changes the default behavior to no longer add /W3 without being
explicitly specified. See the below link for more information about
this behavior change.
https://cmake.org/cmake/help/latest/policy/CMP0092.html
Both ApproxVec and ApproxDeg accept a double then convert that to
a float just to then convert it back to a double. We can save an
extra lossy conversion by just accepting a float instead of a double
in the first place.
The previous documentation talks about 'end points' but the current code does not take end point as an argument and hence does not allow specifying the end point of the loop. (Instead the functions allows specifying the beginning offset and the length of the loop.)
Ported sfml-pi DRM/KMS backend written by @mickelson
Port co-authored by @substring
Co-authored-by: Andrew Mickelson <andrew.mickelson@gmail.com>
Co-authored-by: Gil Delescluse <frog2wah@gmail.com>
This is helpful when debugging why files won't load. By printing
the whole path we're making it more clear to the user exactly what
file is failing to load.
This has been a recurring problem. I had to add similar code to the
sf::Angle operator<< because I was getting tiny floating point
differences that after rounding were imperceptable.
The "main" component is not available everywhere, but passing it to the
find_package(SFML) call via the OPTIONAL_COMPONENTS still fails the call
on platforms like Linux.
This commit enables SFML to be used the same in a cross-platform fashion
without forcing consumers to put custom logic around importing SFML.
Example that works with this commit, but break before:
find_package(SFML REQUIRED graphics OPTIONAL_COMPONENTS main)
target_link_libraries(dummy PRIVATE SFML::graphics)
if(SFML_MAIN_FOUND)
target_link_libraries(dummy PRIVATE SFML::main)
endif()