Eldred Habert
78281a4aaa
Break down CTest cases into each test suite ( #1931 )
...
This allows parallelising the individual programs'
test suites, which can save a few minutes!
2026-04-12 21:29:12 -04:00
ISSOtm
6e51ab6f55
Remove a duplicate warning flag
...
We always pass this one
2026-04-13 01:52:25 +02:00
ISSOtm
52aaf7e3b3
Fix MSVC dependent option syntax
...
This is not how CMake works lol
2026-04-13 01:37:38 +02:00
ISSOtm
09db4f25dd
Bump the maximum version of CMake tested with
...
Future-proofing!
This is both the version on my own machine,
and what's distributed by Homebrew (thus on GitHub's runners).
2026-04-13 00:33:31 +02:00
vulcandth
c3b47abcc8
Use CPack for Windows packaging
2026-04-10 18:01:16 +02:00
ISSOtm
021fe01eb0
Avoid CMake looking at test dir if testing is disabled
...
This saves building the two test support programs.
2026-04-08 12:25:43 +02:00
ISSOtm
0692d1d28c
Avoid passing a C++-only flag when compiling C files
...
Avoids compiler warnings. This can happen because zlib and libpng are both C projects,
and we build them from source if they are unavailable.
2026-03-25 17:11:46 +01:00
ISSOtm
b8e425b41d
Avoid passing irrelevant flags to our deps
2026-03-19 20:30:12 +01:00
ISSOtm
6b0658fb59
Cache library deps on Windows
...
Besides the immediate performance improvement, reducing
the frequency of downloads should make spurious
failures (network, rate-limiting...) less bothersome.
2026-03-19 20:30:12 +01:00
ISSOtm
2fb64816a9
Indicate more clearly that LTO is not used in debug mode
...
This has made me worried once or twice
2026-03-19 20:30:12 +01:00
ISSOtm
d6d1844d60
Seek lib deps via CMake FetchContent
...
`FetchContent` respects existing installs, and downloads and compiles the libs
if they aren't found.
This is admittedly a little finicky, since this ignores the usual `Find*`
modules provided by CMake, requiring a bit of glue on our side.
But, one upside is that this moves that logic from our CI into the build system,
which can thus benefit other downstream users.
This also opens the door to some improvements in upcoming commits.
Doing this with Bison turned out to be much more painful, however, due to
`FindBISON` providing the specific `bison_target` command; thus, it remains
installed externally, so that it can be picked up by `FindBISON`.
This also bumps our CMake version requirement slightly, though it's
possible that older versions keep working, or could be supported with small patches;
however, our CI doesn't provide anything below 3.31, so we can't check.
2026-03-19 20:30:12 +01:00
ISSOtm
a9b6cda77b
Reorder CMakeLists commands by topic
2026-03-17 08:18:50 +01:00
ISSOtm
fb4e08ce71
Tidy up CMake sanitizer flags
...
Set the flags in the build itself instead of trying to override the cache
(this was an artifact of when I didn't understand the CMake variable model),
which avoids them being duplicated on each re-configuration.
Also remove `-g`, since it's defined by the build type by default
(we leave it up to the user to choose Debug or RelWithDebInfo).
2026-03-16 20:23:47 -04:00
ISSOtm
7244b9d17e
Silence the same warning as in the Makefile
...
As requested by https://github.com/gbdev/rgbds/pull/1899#discussion_r2943039607
2026-03-16 20:23:47 -04:00
ISSOtm
10e1c9d187
Avoid passing sanitizer options to MSVC linker
...
Apparently it does not support them
2026-03-16 20:23:47 -04:00
ISSOtm
d8722b6705
Use imported targets for linking to libpng
...
This massively simplifies the process lol
2026-03-16 20:23:47 -04:00
ISSOtm
2d0ac7eeb0
Disable exceptions and RTTI when building with CMake
2026-03-16 20:23:47 -04:00
ISSOtm
d5033a2bd9
Handle project version better in CMake
...
Parse the version from `version.hpp`, and check its consistency with
the Git tag to help catch release blunders.
2026-03-16 20:23:47 -04:00
ISSOtm
45fff0fd58
Harmonise naming of CMake test knobs
...
Also reorganise the file a little
2026-03-16 20:23:47 -04:00
ISSOtm
c963c7b1c7
Simplify include directory directive
2026-03-16 20:23:47 -04:00
ISSOtm
35af3185eb
Enable LTO even for multi-config CMake generators
...
See https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html#build-configurations
for the rationale.
2026-03-16 20:23:47 -04:00
ISSOtm
db9d9c7653
Install our man pages in a more standard-configurable manner
2026-03-16 20:23:47 -04:00
ISSOtm
9e5a9107f2
Remove enforced CTest verbosity
...
It can be controlled from the command line instead, and that's better
2026-03-16 20:23:47 -04:00
ISSOtm
275fcf8fcf
Improve CMake-in-tree fatal error message
2026-03-16 20:23:47 -04:00
ISSOtm
34e1f8dcc5
Remove useless MSVC flag
...
CMake only passes a single file at a time anyway
2026-03-16 20:23:47 -04:00
ISSOtm
cd64de9323
Remove a warning triggered by MSVC's own standard library
...
No longer triggers now, so we can remove our workaround for their breakage.
2026-03-16 20:23:47 -04:00
ISSOtm
a01b805e4b
Remove an outdated comment
2026-03-16 20:23:47 -04:00
ISSOtm
676db46c01
Add a few details to the project() call
...
We can use them now that the minimum version has been bumped
2026-03-16 20:23:47 -04:00
ISSOtm
a6f03530ed
Correct minimum CMake version required
...
Turns out the status messages use 3.17
2026-03-16 20:23:47 -04:00
ISSOtm
b56b56a695
Reformat some long warning-flag-setting lines
2026-03-16 20:23:47 -04:00
ISSOtm
dc5fc9f327
Remove obsolete CMake version comment
2026-03-16 20:23:47 -04:00
ISSOtm
3d35457eeb
Avoid showing the "more warnings" option for MSVC
2026-03-16 20:23:47 -04:00
ISSOtm
aea39ec8c8
Log with sanitizers are enabled under CMake
...
This can help bring attention to the MSVC difference (no UBSan there)
2026-03-16 20:23:47 -04:00
ISSOtm
9293068370
Properly specify our max CMake version supported
...
Also bump it to the version I just tested it with
2026-03-16 20:23:47 -04:00
Rangi
8ab4602ae5
Add -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG to develop builds ( #1859 )
2025-11-16 13:11:08 -05:00
Rangi
7c6f778ae7
Take care of miscellaneous commented TODOs ( #1676 )
2025-05-02 16:44:12 -04:00
Rangi42
c841672059
Don't use tabs for alignment
2025-03-31 19:13:46 -04:00
Rangi
03452c6d4f
Allow git describe to get the version for FreeBSD and Cygwin in CI ( #1640 )
...
* Specify `safe.directory`
* Fetch tags
* Fetch all commits
2025-01-29 19:57:15 -05:00
Rangi
8363f25d47
Enable more sanitizers in make develop ( #1588 )
...
- `-fsanitize=undefined` encompasses multiple checks we were specifying
- "detect_leaks=1" for `__asan_default_options` checks for memory leaks
(except for with macOS clang++, which does not support LSan)
- `-fsanitize=float-divide-by-zero` is an extra UBSan check
(and reveals a UB bug to fix with fixed-point `DIV` and `LOG`)
2024-12-31 10:02:20 +01:00
Sylvie
c1b85554a8
Document obsolete syntax in rgbasm-old(5) ( #1571 )
2024-12-10 12:34:37 -05:00
Sylvie
b877c81c32
Use C++-style casts ( #1576 )
2024-12-09 21:56:54 -05:00
JL2210
e623aeb85d
Make tests work with CTest ( #1539 )
...
Adds option to disable non-free tests
2024-10-15 19:26:17 -04:00
Sylvie
d5ded84501
Move definition of _POSIX_C_SOURCE to include/platform.hpp ( #1524 )
2024-09-29 23:53:15 +02:00
Rangi42
0adff57e2c
Sync warning flags between Makefile and CMakeLists.txt
2024-08-08 16:02:11 -04:00
ISSOtm
0c0923ac16
Disable some spurious MSVC warnings
...
Not that it will de-clutter our CI logs very much, but eh, you know.
2024-03-28 01:33:21 +01:00
Sylvie
54d6a22d19
Build with pedantically standard C++ ( #1309 )
...
* Remove array designators (not standard C++)
* Build with pedantically standard C++
2024-02-23 16:46:53 -05:00
Eldred Habert
efaef7039e
Make sure to detect Git info from *our* Git repo ( #1303 )
2024-02-18 17:08:30 -05:00
Eldred Habert
fd78a9ae83
Port linkerscript parser to Bison ( #1266 )
...
Notable side effects:
* Use the standard-conformant MSVC preproc
* Add test for linker script INCLUDE
* Improve wording of placement conflict errors
* Fix errors from not newline-terminated files
* Teach checkdiff about the linker script doc
* Call linker script "commands" "directives" instead
---------
Co-authored-by: Rangi42 <remy.oukaour+rangi42@gmail.com >
2023-12-11 02:29:37 +01:00
Rangi
f3dbf17b78
AUTHORS and more copyright comments are redundant with CONTRIBUTORS.rst ( #1227 )
2023-11-07 17:57:59 -05:00
Rangi
1e70e703a7
Build everything as C++ ( #1176 )
2023-11-07 21:45:56 +01:00