Commit Graph

3596 Commits

Author SHA1 Message Date
Chris Thrasher
d6079ce526 Reenable sf::Cursor tests
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.
2023-09-13 16:19:18 -06:00
Vittorio Romeo
5cfbf912c7 Do not ignore '[[nodiscard]]` functions in example code 2023-09-13 16:06:23 -06:00
Chris Thrasher
a71d6bc078 Revert "Disable faulty Windows Clang job"
This reverts commit bbb6f60dda.
2023-09-09 00:17:08 -06:00
Chris Thrasher
7cd1ce1385 Add changelog for 2.6.1 2023-09-07 16:13:04 -06:00
Chris Thrasher
2d2e7fa5f4 Disable warnings as errors by default 2023-09-07 15:21:15 -06:00
Chris Thrasher
0745ea97e0 Disable warnings as errors by default
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.
2023-09-07 14:16:51 -06:00
Chris Thrasher
332d11be41 Add move semantics to sf::RenderTarget and sf::RenderTexture 2023-09-05 17:12:06 -06:00
Chris Thrasher
d304d1e57b Add tests for sf::Clipboard 2023-09-05 16:18:18 -06:00
Chris Thrasher
1811951b4a Allow for shared libs on iOS 2023-09-05 16:04:20 -06:00
Chris Thrasher
71162395d7 Add tests for sf::Keyboard 2023-09-05 15:19:53 -06:00
Chris Thrasher
70f9d49559 Add tests for sf::Texture::generateMipmap 2023-09-05 10:58:14 -06:00
Chris Thrasher
d7ab9208be Add tests for sf::RenderTexture
The generateMipmap test was failing because I forgot to enable MESA
in the MinGW Static Standard Library job.
2023-09-05 10:58:14 -06:00
Chris Thrasher
0a3b0d1d16 Add tests for sf::RenderTarget 2023-09-05 10:58:14 -06:00
binary1248
f6612dd1f0 Cache the results of WglContext::selectBestPixelFormat to speed up context creation on systems where pixel format selection is an expensive operation. Closes #2508 2023-09-05 09:35:42 -06:00
Chris Thrasher
78973e4a06 Use imported targets for Vorbis and Ogg
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.
2023-08-29 23:18:00 -06:00
Chris Thrasher
450acdeac2 Use OpenAL::OpenAL target
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.
2023-08-29 23:18:00 -06:00
Chris Thrasher
fc4a282a64 Add Freetype::Freetype target 2023-08-29 23:18:00 -06:00
Chris Thrasher
2c7ed96654 Add FLAC::FLAC target 2023-08-29 23:18:00 -06:00
Chris Thrasher
1aa6750f50 Don't modify external targets 2023-08-29 23:18:00 -06:00
Chris Thrasher
26e54c7b2c Remove irrelevant entries from .gitignore
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.
2023-08-29 23:14:58 -06:00
Johel Ernesto Guerrero Peña
c596d6cf3f fix: use non-deprecated form of UDL declaration
Clang 18 issues a deprecation warning,
and is converted to an error with `-Werror`.
2023-08-28 14:25:54 -06:00
Chris Thrasher
1cca7cde7e Consistently use getNativeHandle function name 2023-08-27 16:52:00 -06:00
kimci86
282dedd0d5 Fail to destruct used SoundBuffer also in release builds 2023-08-27 16:46:52 -06:00
kimci86
635c8c9290 Make Sound::getBuffer return a reference
because the pointer now cannot be null
2023-08-27 16:46:52 -06:00
kimci86
9cbcd56eb8 Remove Sound default constructor
so that a Sound instance is always bound to a SoundBuffer
2023-08-27 16:46:52 -06:00
Chris Thrasher
63088c1bf1 Add tests for sf::SocketSelector
I added move semantics while I was at it
2023-08-27 16:46:05 -06:00
Chris Thrasher
b3a467678d Add tests for sf::Http
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.
2023-08-27 16:46:05 -06:00
Chris Thrasher
364fe38956 Add tests for sf::UdpSocket 2023-08-27 16:46:05 -06:00
Chris Thrasher
90d6d74282 Add tests for sf::TcpSocket 2023-08-27 16:46:05 -06:00
Chris Thrasher
ab06efbe95 Add tests for sf::TcpListener 2023-08-27 16:46:05 -06:00
Chris Thrasher
05b69119e4 Add tests for sf::Event 2023-08-27 10:04:14 -06:00
Chris Thrasher
71615c8268 Use struct for user defined type with no private section 2023-08-27 10:04:14 -06:00
Chris Thrasher
e5c41c4eb5 Enable move semantics for socket types 2023-08-26 22:17:34 -06:00
Chris Thrasher
29ed8bf3a0 Add tests for sf::Socket 2023-08-26 22:17:34 -06:00
Chris Thrasher
bbb6f60dda Disable faulty Windows Clang job
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.
2023-08-26 21:09:31 -06:00
Chris Thrasher
6d3c8d0786 Remove templates where not necessary 2023-08-23 09:34:25 -06:00
Chris Thrasher
962e6ed972 Default to building static libraries
See https://github.com/SFML/SFML/issues/2389 for full rationale
2023-08-23 09:17:43 -06:00
Chris Thrasher
3b71bfc1d7 Remove nonexistent link library 2023-08-23 09:14:59 -06:00
Chris Thrasher
f0e72be285 Prefer using IMPORTED targets where possible
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.
2023-08-23 09:14:59 -06:00
Chris Thrasher
af7d6c2589 Simplify sfml_find_package
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.
2023-08-23 09:14:59 -06:00
Chris Thrasher
62c376ffa5 Remove unnecessary parentheses 2023-08-21 09:07:32 -06:00
Chris Thrasher
37575e4ed7 Use native CMake support for detecting architecture size 2023-08-21 09:05:30 -06:00
Chris Thrasher
5f87a04111 Remove use of deprecated CMake variable 2023-08-21 09:02:07 -06:00
Lukas Dürrenberger
9dff7b50c1
Merge branch '2.6.x' into master 2023-08-17 20:36:04 +02:00
Chris Thrasher
27a75d2c6c
Merge remote-tracking branch 'origin/2.6.x' into feature/backmerge 2023-08-16 19:57:57 -06:00
kimci86
66a5f3c42c Skip ClientMessage events with other window ID unless it is for IM 2023-08-16 19:52:56 -06:00
kimci86
6232f719a5 Add CMakeUserPresets to .gitignore
Now that we use a CMakePresets.json file for CI, it makes sense to
support users having their own presets in a CMakeUserPresets.json file.

From CMake documentation:

> CMakePresets.json may be checked into a version control system, and
> CMakeUserPresets.json should NOT be checked in. For example, if a
> project is using Git, CMakePresets.json may be tracked, and
> CMakeUserPresets.json should be added to the .gitignore.
2023-08-14 14:33:41 -06:00
Chris Thrasher
10bd1ffeba Remove $GITHUB_WORKSPACE where not needed 2023-08-12 12:10:46 -06:00
Chris Thrasher
157feec05d Simplify CI with CMake presets 2023-08-11 15:25:14 -06:00
Chris Thrasher
5c41a7c6bb Test SFML_USE_STATIC_STD_LIBS 2023-08-11 14:57:10 -06:00