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`.
12 lines
205 B
C++
12 lines
205 B
C++
#include "mtl/mat_impl.hpp"
|
|
|
|
namespace mtl {
|
|
|
|
template class mat<3, 3>;
|
|
|
|
template mat<3, 3> operator*(const vec<3>&, const mat<1, 3>&);
|
|
template mat<3, 3> mat<3, 3>::operator*(const mat<3, 3>&) const;
|
|
|
|
}
|
|
|