Modularize the CMake build targets of each game #1124
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR modularizes the dependencies for
amazons
. If you approve of my general direction, I'll extend this to all the games, which should cut the test folder's size from 600MB to 100MB and reduce test linkage time by 33%.While trying to build the test for one of the games, I noticed the
Makefile
had me building every game:In addition to building everything, it seems to have linked everything in as well, resulting in a 7.4MB test:
Since every test links every game in, every test is at least 7.4MB:
The directory is 608MB, which is what we expect from 80 tests, each 7.5MB:
Removing redundant linkage reduces the size of
amazons_test
by a factor of 5:And cuts a third off of the link time of
amazons_test
:I expect this change will do the same for each test.