Commit Graph

39 Commits

Author SHA1 Message Date
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
ISSOtm
b936ca27ab Enable _ISOC11_SOURCE
See #789
2021-04-23 17:07:52 +02:00
ISSOtm
b598911e96 Enable LTO in release builds
Fixes #693
2021-01-09 20:31:15 +01:00
Rangi
7e3fc1db03 Fix Actions CI for MSVC
Fixes #616
2021-01-04 02:01:25 +01:00
ISSOtm
71d8aeb4c2 Add CMake defines to enable tracing lexer and parser 2020-10-12 09:02:21 +02:00
ISSOtm
06f7387466 Avoid using VLA in EQUS dumping
MSVC does not support those...
Also add a `develop` warning about VLAs, to avoid future incidents
2020-10-06 08:55:45 +02:00
James Larrowe
761c775043 Modularize CMake build configuration
Build type no longer defaults to Release (!)
have separate options for extra warning flags and sanitizers

toss DEVELOP macro

Fix sanitizers with CMake while I'm at it :|
2020-10-04 13:28:00 -04:00
ISSOtm
5a65188ca9 Implement compact file stacks in object files
Gets rid of `open_memstream`, enabling Windows compatibility again
Also fixes #491 as a nice bonus!
2020-10-04 04:46:01 +02:00
James Larrowe
03e20138d3 Use pkg-config to detect libpng
Only fall back to findpng
2020-10-01 18:58:36 -04:00
ISSOtm
d09ed3e52e Get rid of flex as a dependency in CMakeLists
It will actually not be needed for new lexer
2020-09-20 03:39:53 +02:00
James Larrowe
c85b48f23e Default to debug when building in develop mode 2020-08-16 13:58:02 -04:00
James Larrowe
5a9f2b7750 Add DEVELOP option to CMake
This requires CMake 3.0 so -Werror won't conflict with link tests.
Remove all version checks to improve simplicity.
2020-08-16 13:23:29 -04:00
James Larrowe
2d6bdbc1b1 Use versioning consistent with the Makefile in CMake
This uses git to determine the dirty version and uses a fallback
if that's not available.
2020-07-23 10:47:01 -04:00
ISSOtm
8c0adb63a1 Sync release version in CMakeLists 2020-07-21 23:54:36 +02:00
ISSOtm
874bd92604 Only require libpng 1.2 in CMakeLists
This version is sufficient for rgbgfx to function properly, according to testing.
The security problems are not ours to decide, however!
2020-07-21 23:23:52 +02:00
James R Larrowe
819c36943e Add CMake build system
This should hopefully work torwards compatibility with more systems.
I've tried to make this as general as possible but some small assumptions
about the compiler are made. I've also tried to recreate the build process
as closely as possible, but I had to change some things slightly to work
with CMake (version strings, mainly).

For now, it doesn't allow in-source builds, as that could overwrite the
Makefile.

This adds:

- Support for more build systems
- Automatic dependency generation
- Performance gains (especially when using i.e. Ninja)

Defaults to Release build.
2020-07-03 15:10:18 -04:00