MarkOates / blast

0 stars 0 forks source link

Makefile uses production .a file in tests #46

Open MarkOates opened 3 months ago

MarkOates commented 3 months ago

Problem

During build, a library is built that is intended for tests (e.g. lib/liballegro_flare-0.8.11wip-for_tests.a). This is different from the normal library, which will not be built until the tests have passed. At least that's the intention.

I suspect the production library is used in tests, and this should be fixed. I believe the reason it hasn't is because there is some discrepancy in the order-of-needed-things specifically in the allegro_flare project, the blast project, since they are the lowest level things that build the other projects. For example, building tests in allegro_flare should use the lib/liballegro_flare-0.8.11wip-for_tests.a library, while building tests for other projects should use the production allegro_flare library lib/liballegro_flare-0.8.11wip.a.

It can be helpful to remove the @ on build lines (e.g. @g++ ...) to see the output.

I also believe this went largely unnoticed because the obj files were linked as well as the library, causing the object files to override the library. This duplication should be fixed, too.

This could also explain the noisy warnings when running the debug console (and when running certain other stages of build related to debugging symbols).