Commit Graph

65 Commits

Author SHA1 Message Date
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
ISSOtm
28737d5778 Enable GLIBCXX_ASSERTIONS in make develop
Not sure it's very portable, but this is only the dev config
2022-10-12 01:23:37 +02:00
ISSOtm
3cfe7800c7 Make randtilegen and rgbgfx_test compile with MSVC 2022-07-02 17:04:17 +02:00
ISSOtm
cbf6fadcdb Add RGBGFX tests 2022-07-02 17:04:17 +02:00
ISSOtm
8c62e80c18 Reimplement basic RGBGFX features in C++
Currently missing from the old version:
- `-f` ("fixing" the input image to be indexed)
- `-m` (the code for detecting mirrored tiles is missing, but all of the
        "plumbing" is otherwise there)
- `-C`
- `-d`
- `-x` (though I need to check the exact functionality the old one has)
- Also the man page is still a draft and needs to be fleshed out

More planned features are not implemented yet either:
- Explicit palette spec
- Better error messages, also error "images"
- Better 8x16 support, as well as other "dedup unit" sizes
- Support for arbitrary number of palettes & colors per palette
- Other output formats (for example, a "full" palette map for "streaming"
  use cases like gb-open-world)
- Quantization?

Some things may also be bugged:
- Transparency support
- Tile offsets (not exposed yet)
- Tile counts per bank (not exposed yet)

...and performance remains to be checked.
We need to set up some tests, honestly.
2022-07-02 17:04:17 +02:00
ISSOtm
ec25b4ac0e Disable -Winline
<@aaaaaa123456789> I mean, `-Winline -Werror` is the "make my builds fail at random for no reason" switch
2022-06-04 11:14:07 +02:00
ISSOtm
7e94ecbfe6 Move all man pages to a separate directory
Simplifies processing all around, and makes more sense
2022-05-15 13:34:35 +02:00
ISSOtm
a4ead0c25f Freshen version number when building with CMake
Fixes #979
2022-03-11 09:21:08 +01:00
ISSOtm
ac59ecf3c0 Enable -Wsign-compare and fix the warnings 2022-02-05 20:11:25 +01:00
ISSOtm
72b677a8d7 Enable "debug" optimizations in make develop
Enhances some warnings as well as the sanitizers (Clang especially complained about it)
The `-f*` flags are to get better stack traces out of the sanitizers, as recommended
by Clang's docs: https://clang.llvm.org/docs/AddressSanitizer.html#usage

GCC's docs claim that these optimizations should not hinder the debugging
experience, and Clang's don't mention optimization flags at all.
2022-02-05 20:11:25 +01:00
ISSOtm
b3304ae1ac Add more warnings to develop
As suggested by #969
2022-02-05 20:11:25 +01:00
ISSOtm
a48801a675 Trim down develop warning list and add comments
Remove already-enabled warnings as pointed out by #969
Comments added to the CMakeLists because the Makefile format does not really allow them
"Plain" list also sorted alphabetically, the rest (somewhat) thematically
2022-02-05 20:11:25 +01:00
Rangi
c2ca46c27d Remove TRACE_PARSER support
Attempting to build with this gave an "undefined reference to `yydebug'"
error (maybe a version issue with bison?), and I don't think it's been
used for recent parser debugging either.
2021-11-22 23:49:59 +01:00
Rangi
aac839f389 Remove dbgPrint and TRACE_LEXER support
I have not found `TRACE_LEXER` to be useful in debugging
actual lexer issues.
2021-11-22 23:49:59 +01:00
ISSOtm
0d6bfb84ce Ignore unknown warning options
GCC and Clang do not understand the exact same warning option sets
2021-10-31 21:17:51 +01:00
Jakub Kądziołka
d360d03403 Enable address sanitizer in develop builds (#834)
Co-authored-by: ISSOtm <eldredhabert0@gmail.com>
2021-05-02 18:08:03 +02:00