Closed seriema closed 8 years ago
Just as a fun reference, here are the CI build times:
AppVeyor (timing after build step, not including test): master: Time Elapsed 00:00:09.08 jp/simple-shared-lib: Time Elapsed 00:00:06.64
Travis (total time): master on Linux: 2 min jp/simple-shared-lib on Linux: 1 min master on OSX: 1 min 44 sec jp/simple-shared-lib on OSX: 1 min 26 sec
I tried going a step further and make our /lib
into the a_retro_lib
library. It works and cleans up our main CMakeLists.txt
, but we still need to expose DEPENDENCIES_INCLUDES
and that makes things slightly harder to follow. Having all the "packaging" in the main CMakeLists.txt
felt easer to follow IMHO. Unless someone knows how to do it better?
Here's a patch diff file of my attempt (github doesn't accept *.patch
so I added .txt
):
lib-as-lib.patch.txt
If we don't expose the include files the build fails with:
/Users/jojoh/Documents/Github/a-retro-ui/src/platform.h:15:10: fatal error: 'SDL.h' file not found
Create a_retro_lib for our dependencies and a_retro_core libraries for our shared code so we don't need to recompile all the source files twice when building the a_retro_test and a_retro_ui executables. This was especially annoying on Raspberry Pi which is pretty slow.
The idea is to run
build.sh
but as a benchmarktime ./scripts/rebuild.sh
gives:On MacBook Pro: master: real 0m13.086s jp/simple-shared-lib: real 0m9.646s
On Raspberry Pi 3: master: 2m54.889s jp/simple-shared-lib: 2m16.290s