Commit Graph

2650 Commits

Author SHA1 Message Date
Chris Thrasher
46b9c79b77 Link to latest CMake docs 2022-10-12 00:23:35 +02:00
Chris Thrasher
ff685de1bf Ensure add_custom_command uses VERBATIM
https://cmake.org/cmake/help/latest/command/add_custom_command.html

"Use of VERBATIM is recommended as it enables correct behavior."

The docs basically say that this is required.
2022-10-12 00:23:35 +02:00
Chris Thrasher
88f9a33479 Use PROJECT_ variables 2022-10-12 00:23:35 +02:00
Chris Thrasher
b848a7b29a Only reference the project's directories, not parent directories 2022-10-12 00:23:35 +02:00
Chris Thrasher
5e880a2511 Fix directory install rules
-- Installing: /Users/runner/work/SFML/SFML/install/./include
-- Installing: /Users/runner/work/SFML/SFML/install/./include/SFML

becomes

-- Installing: /Users/runner/work/SFML/SFML/install/include
-- Installing: /Users/runner/work/SFML/SFML/install/include/SFML

Likewise for installing lib/
2022-10-12 00:23:35 +02:00
Chris Thrasher
fc0bd0bfc8 Don't specify standard library on macOS
libc++ is already the default and GCC can't even be used so there's
no circumstance where we'd need to explicitly tell Clang to use
libc++. I confirmed that even with this removed, libc++ headers are
still being used and found.
2022-10-12 00:23:35 +02:00
Chris Thrasher
f5a3442ba6 Remove macOS architecture checks
You cannot buy anything but a 64 bit x86 or ARM Mac today so there
is no need to ensure that one of these two architectures is being
used. It's definitely one of the two.
2022-10-12 00:23:35 +02:00
Chris Thrasher
9feef3708d Test existence of copy and move semantics 2022-10-10 11:46:55 -06:00
Vittorio Romeo
fd5c358c98 Add PCH builds via 'SFML_ENABLE_PCH' CMake option 2022-10-09 14:21:11 +02:00
Chris Thrasher
7a5b862fd0 Consolidate redundant gl.h headers 2022-10-09 13:04:24 +02:00
Vittorio Romeo
58b4346895 Add '[[nodiscard]]' to 'IpAddress::resolve' 2022-10-07 14:37:53 +02:00
Vittorio Romeo
753644a5bd Fix CMake formatting inconsistencies 2022-10-06 20:33:40 +02:00
Vittorio Romeo
e948a5f41e Improve static initialization of vectors 2022-10-06 19:58:10 +02:00
Chris Thrasher
0e475f3f50 Test reinterpreting an sf::Color as a std::uint8_t* 2022-10-05 20:26:25 +02:00
Chris Thrasher
939ec267df Improve const correctness 2022-10-01 23:19:52 +02:00
Chris Thrasher
e44a4b305d Simplify operator<< implementations 2022-10-01 23:19:52 +02:00
Chris Thrasher
25fa30afc6 Make test case names more readable
Test output now shows the module name left-aligned so you can easily
browse to see what modules have what tests and know what module a
failing test is coming from.
2022-10-01 23:19:52 +02:00
Chris Thrasher
acabaadc0b Remove unnecessary sf:: usage 2022-10-01 23:19:52 +02:00
Chris Thrasher
28a4a88832 Add more tests for sf::Packet 2022-10-01 12:35:29 -06:00
Chris Thrasher
12aaa4d08a Use macros for test abstractions to preserve line number information 2022-10-01 12:35:29 -06:00
Chris Thrasher
abc8d858c3 Only include header under test 2022-10-01 12:35:29 -06:00
Lukas Dürrenberger
4970af8999 Use CMake property to drive static linking
Using a newer CMake version allows us to make use of the
MSVC_RUNTIME_LIBRARY added in CMake 3.15, which handles static linking
of the runtime library with MSVC a lot simpler
2022-09-30 22:17:03 +02:00
Chris Thrasher
2f49f1ef92 Acknowledge latest SFML team member 2022-09-28 07:30:21 +02:00
Chris Thrasher
34ee40c835 Use scoped enumerations in Network module 2022-09-27 17:30:13 +02:00
Jonny Paton
e01e4760e9 Fix cocoa example - some absolute paths needed in cmake, and float conversion to sf::Angle 2022-09-26 23:50:26 +02:00
Jonny Paton
0b4d9ca822 Test Xcode generator in CI 2022-09-26 23:50:26 +02:00
Pierce Brooks
c565daccae fix visual studio 2019 complaints regarding the int64_t type not being a member of the std namespace 2022-09-22 12:26:06 +02:00
Chris Thrasher
3a3935d005 Replace sf::Uint64 with std::uint64_t 2022-09-13 11:15:03 -06:00
Chris Thrasher
05690b963d Replace sf::Int64 with std::int64_t 2022-09-13 11:15:03 -06:00
Chris Thrasher
b94df9e0d8 Let tests succeed even if nullopt is returned
This is the desire behavior when the network fails so we can't
just fail the test when this happens.
2022-09-12 15:58:51 -06:00
Chris Thrasher
105ff68a6a Time out test for public IP address
On poor network connections, the call to getPublicAddress may hang
indefinitely. If it is to succeed, let's require that it succeed
within a reasonable time frame to put an upper limit on how long
this test takes to run.
2022-09-12 15:58:51 -06:00
Chris Thrasher
e294090c8e Replace sf::Uint32 with std::uint32_t 2022-09-12 15:36:55 -06:00
Chris Thrasher
056f66a2b8 Replace sf::Int32 with std::int32_t 2022-09-12 15:36:55 -06:00
Chris Thrasher
ff9c9131b3 Replace sf::Uint16 with std::uint16_t 2022-09-12 21:36:13 +03:00
Chris Thrasher
e21ae3204e Replace sf::Int16 with std::int16_t 2022-09-12 21:36:13 +03:00
Chris Thrasher
50cec7d2ed Treat each test case as a unique test 2022-09-10 20:03:25 +03:00
Chris Thrasher
e2528de20a Replace sf::Uint8 with std::uint8_t 2022-09-09 10:28:53 +02:00
Chris Thrasher
af34794123 Replace sf::Int8 with std::int8_t 2022-09-09 10:28:53 +02:00
Chris Thrasher
82b48a7520 Use std::size_t 2022-09-07 22:23:22 +02:00
LDprg
f521e2ec48 fix formatting and add comment 2022-09-06 16:00:39 +03:00
LDprg
0584448a06 speed up code by 10 times replacing hypot with sqrt 2022-09-06 16:00:39 +03:00
Chris Thrasher
45986c6400 Avoid opening namespace std 2022-09-05 23:35:25 +02:00
Chris Thrasher
8561101b11 Add conversions between sf::Time and std::chrono::durations 2022-09-05 23:35:25 +02:00
Chris Thrasher
ebb2d9d186 Implement sf::Time with <chrono> 2022-09-05 23:35:25 +02:00
LDprg
41053f9983 edit gitignore to ignore clion default output directory 2022-09-05 22:32:44 +02:00
Chris Thrasher
72d88033e2 Use relative paths for resource files 2022-08-22 11:26:57 +08:00
Chris Thrasher
40b175adf4 Remove check for old macOS versions
There is no need to check for macOS 10.6 or lower. Snow Leopard came
out in 2009. Because it's nearly 13 years old, it's safe to say
nobody will be trying to build SFML 3 on Snow Leopard.

This was added in de70f691e way back in 2011 when Snow Leopard was
a mere cub.
2022-08-22 11:26:57 +08:00
Chris Thrasher
b7510fd09e Fix formatting and style
Use all lower_case commands with no space between the command name
and the open parentheses. Don't repeat conditional in else() and
endif() calls.
2022-08-22 11:26:57 +08:00
Chris Thrasher
78e532215a Simplify how lists are expanded 2022-08-22 11:26:57 +08:00
Chris Thrasher
8384139983 Remove unnecessary variable assignment
This same code already exists in src/CMakeLists.txt
2022-08-22 11:26:57 +08:00