15 Commits

Author SHA1 Message Date
Myles Busig
9559815380 Add conditional test includes and fix inconsistent file naming 2024-10-08 00:21:38 -07:00
Myles Busig
bdd44757ec Fix missing include directories while compiling tests 2024-10-08 00:15:40 -07:00
Myles Busig
3c2b6855f3 Add conditional test compilation and split matrix instantiations
This commit adds the ability to conditionally compile tests. To
implement this, common source files needed to be moved to a subdirectory
`common`.

Additionally, this commit splits each `mat` template instantiation into
a separate source file. This enables the linker to discard unused
instantations. If each instantiation is placed in the same file and also
into the .iwram section, the linker will include every symbol in the
resulting binary, leading to an extremely high IWRAM usage. To introduce
this split, a new header file "mat_impl.hpp" was added containing
implementation details for the template instantiations. "mat_impl.hpp"
should ONLY be included by the source files containing explicit
instantiations of `mat`.
2024-10-07 23:49:01 -07:00
Myles Busig
824792c358 Add fixed point multiplication tests 2024-08-29 22:07:08 -07:00
Myles Busig
55b1658e45 Change architecture dependent compilation to not use janky hacks
Previously didn't add the source to the target if a source of the same
name already existed. This was janky because these files would be
considered the same: src/foo.cpp src/armv4t/bar/baz/foo.cpp, even though
they really shouldn't. What should happen instead, is that the symbols
of the architecture-specific code should not be overridden by the common
implementation regardless of where the file is placed. This means that
if the files src/foo.cpp and src/armv4t/bar.cpp contain implementations
of the function foo, the armv4t implementation will be exported
even though it uses a different filename from the common
implementation. This commit implements this behaviour by using
the way symbols are naturally resolved. Multiple smaller
libraries are built for each architecture dependent code.
Afterwards the libraries are linked into one, with the arch specific
libraries linked first.
2024-04-04 04:11:07 -06:00
Myles Busig
93656fc50f Change CMake to not build the common implementation when there is a
platform specific alternative
2024-03-27 00:31:15 -06:00
Myles Busig
eb21945c81 Add source directory for GBA specific files 2024-03-26 23:24:48 -06:00
Myles Busig
45cdce1135 Remove armv4t specific include directory from build
Directory was removed in a previous commit.
2024-03-25 17:18:31 -06:00
Myles Busig
829220d5ca Add support for debug-build specific files 2024-03-12 00:40:02 -06:00
Myles Busig
c7918a2b8b Update CMakeLists.txt to use globbing, and support arch. dependent files
CONFIGURE_DEPENDS option was added in CMake v3.12. This option allows the
build system to automatically re-run CMake if the glob changes, solving the
major issue with globbing. May have a performance impact, but it should be
negligible compared to the time spent building.
2024-03-10 21:55:50 -06:00
Myles Busig
99bb7d4b6e Add initial string_view implementation 2024-03-07 14:24:10 -07:00
Myles Busig
6f74f94aee Add initial fixed point number implementation 2024-03-06 23:42:48 -07:00
Myles Busig
516644ef9a Add finite state machine header to cmake 2024-03-06 23:05:15 -07:00
Myles Busig
e19cb4a079 Fix incorrect paths in CMakeLists.txt 2024-03-04 20:56:36 -07:00
Myles Busig
29aa5bdc5b Add cmake files and initial memcpy/string implementation 2024-03-04 20:44:58 -07:00