Commit Graph

2683 Commits

Author SHA1 Message Date
Chris Thrasher
052e624ddf Remove GCC 4 workaround 2022-01-21 21:19:05 +01:00
Chris Thrasher
a322d18e63 Use built-in CMake project version functionality 2022-01-21 21:09:20 +01:00
Lukas Dürrenberger
60deef9997 Add support for VS 2022 to the GitHub Actions workflow 2022-01-20 10:53:52 +01:00
Chris Thrasher
7cdb728e52 Add tests for sf::BlendMode 2022-01-20 07:39:19 +01:00
Chris Thrasher
871c021a75 Add tests for sf::ContextSettings 2022-01-13 23:49:37 +01:00
Vittorio Romeo
a880122836 Reintroduce 'SleepImpl' sleep implementation 2022-01-12 00:01:35 +00:00
Chris Thrasher
da6a226941 Add tests for sf::Clock 2022-01-11 22:49:00 +00:00
Chris Thrasher
4586db91a9 Add SFML:: namespace to targets
This removes the sfml- prefixed targets from the export set. The sfml-
prefixed targets are still available within the build tree but not to
downstream users thus making this an API breaking change when compared
to the 2.x releases. To keep things consistent, usage of the sfml-
targets were replaced with their namespaced counterparts.

This has a number of benefits:

  1. It's more idiomatic. Modern CMake libraries are expected to
     have namespaced targets.

  2. Namespaced targets are less likely to collide with user-defined
     targets. No one will accidentally define a SFML:: target.

  3. If a namespaced target is not found by CMake, configuration
     will immediately stop.
2022-01-11 22:27:39 +01:00
Vittorio Romeo
d5604b91c6 Add '.gitignore' file 2022-01-10 10:34:55 +01:00
Chris Thrasher
70e0ad28d4 Only build Cocoa example when using Xcode 2022-01-08 19:46:19 +01:00
Chris Thrasher
b717a68fba Add tests for sf::Transform 2022-01-08 15:06:12 +01:00
Lukas Dürrenberger
c36a7821ee
Merge pull request #1961 from SFML/feature/back_merge
Back-merge changes from 2.6.x to master
2022-01-08 13:04:53 +01:00
Lukas Dürrenberger
3a402f241a Merge branch '2.6.x' into feature/back_merge 2022-01-08 12:28:34 +01:00
Chris Thrasher
3d01efb80a Use operator<< for printing during test failure 2022-01-07 20:04:54 +01:00
Chris Thrasher
cd84b19669 Define fixed-width integer type aliases in terms of standard fixed-width types 2022-01-06 21:02:14 +01:00
Chris Thrasher
79c2aadbcc Remove redundant 4-param sf::Rect<T> constructor 2022-01-06 20:04:03 +01:00
Chris Thrasher
6c816aba44 Add tests for sf::Vertex 2022-01-06 20:02:09 +01:00
Chris Thrasher
7d47e740bb Only build Cocoa example when using Xcode 2022-01-04 23:05:23 +01:00
Jan Haller
2ea46c8702 Fix WindowImplX11 initialization 2022-01-04 19:21:32 +01:00
Chris Thrasher
3197dc8029 Remove redundant formatters 2022-01-03 08:27:43 +01:00
Vittorio Romeo
3dc8fc0923 Add 'NetworkUtil' for network module tests 2022-01-03 01:00:55 +01:00
Chris Thrasher
ff4fc05b18 Stop configuration when GCC is detected on macOS 2022-01-02 23:15:05 +01:00
Jan Haller
3b06972602 Update year to 2022 2022-01-02 23:06:31 +01:00
Vittorio Romeo
5ba6580568 Make 'Time' a 'constexpr' class 2021-12-28 16:52:52 +01:00
Chris Thrasher
dafdacfa20 Let tests and examples inherit language requirement from upstream targets
It's not necessary to re-specify cxx_std_17 since any example or test
which depends on a core target (which should be all of them) will pick
up this language requirement that should be a public property of those
targets. If that changes, these examples and tests will possibly fail
to compile and correctly catch the bug that was introduced in the core
library targets.
2021-12-28 15:53:08 +01:00
Chris Thrasher
f5541d22e5 Add tests for sf::VideoMode 2021-12-27 19:09:35 +01:00
Vittorio Romeo
50d28e3879 Add tests for 'sf::Color' 2021-12-27 17:35:06 +01:00
Chris Thrasher
14fff20eb8 Remove redundant API taking x,y pair instead of sf::Vector 2021-12-26 17:13:18 +01:00
Vittorio Romeo
29983aa8d4 Replace Catch with Doctest 2021-12-24 15:06:32 +01:00
Chris Thrasher
ade9843dd8 Collapse test/src directory 2021-12-24 11:56:58 +01:00
Chris Thrasher
54b8a691d1 Add unit tests for sf::Time 2021-12-23 20:34:33 +01:00
kimci86
53594dfbe7 Fix null pointer dereference in Font 2021-12-23 17:03:16 +01:00
Vittorio Romeo
46639ed277 Manipulate library names on Windows + Clang 2021-12-22 08:53:03 +01:00
kimci86
d0c63f46fc Use a smart pointer to manage std::FILE pointer in FileInputStream 2021-12-22 02:35:45 +01:00
Chris Thrasher
cd1cc62f6d Fix issue with MinGW not handling large files 2021-12-21 23:11:15 +01:00
Chris Thrasher
0f83e3d266 Use FetchContent to grab latest Catch2 release
The key benefit here is that now we're linking against their CMake
target which makes it easy to change how we depend on Catch2. We
can switch from FetchContent to FindPackage to a git submodule and
never have to change our code because we're depending on Catch2 in
the most flexible way possible.
2021-12-21 23:11:15 +01:00
Vittorio Romeo
7364d5b578 Fix broken OpenGL example 2021-12-21 20:41:44 +01:00
Vittorio Romeo
f6de7eca40 Use smart pointers to manage memory 2021-12-21 19:54:25 +01:00
Vittorio Romeo
257c78f07a Don't use 'sf::err' in public example code 2021-12-20 15:06:27 +01:00
Lukas Dürrenberger
e982d08f37
Merge pull request #1920 from SFML/feature/backmerge
Back-merge changes from 2.6.x to master
2021-12-20 14:22:56 +01:00
Lukas Dürrenberger
3cd45a283b Merge branch '2.6.x' into feature/backmerge 2021-12-20 13:44:56 +01:00
Chris Thrasher
14bbb0d1cc Unify toLower implementations 2021-12-20 08:29:05 +01:00
Pawel Paruzel
c824d3d57a Fix all macOS clang warnings
Co-authored-by: binary1248 <binary1248@hotmail.com>
2021-12-20 00:10:55 +01:00
Pawel Paruzel
4df16d19e5 Fix Clang warnings on Android 2021-12-20 00:10:55 +01:00
Pawel Paruzel
aae00e9002 Fix cmake -DWARNINGS_AS_ERRORS=1 for clang 2021-12-20 00:10:55 +01:00
Chris Thrasher
dda821597b Only compile Catch main once
Because Catch is so expensive to compile, it's really helpful for
initial compile times if this target doesn't have to be recompiled
so often. This won't make a huge impact on developers who are mostly
doing incremental builds but can have a meaningful impact on CI
runners that are always doing clean builds.
2021-12-19 23:11:14 +01:00
Vittorio Romeo
4a189d6602 Remove build logic for unsupported compilers 2021-12-19 21:51:53 +01:00
Vittorio Romeo
18bb892625 Improve compilation times by removing some includes and avoiding heavy dependencies 2021-12-19 18:13:07 +01:00
Vittorio Romeo
569a7549d4 Fix -Wmissing-braces warning under clang 2021-12-19 15:58:29 +01:00
Vittorio Romeo
a20d73aafa Make 'Vertex' a 'constexpr' class 2021-12-19 15:35:47 +01:00