1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 18:17:45 +00:00

Meta/LibTest: Build object libraries for test main files

By using the power of object libraries and $<TARGET_OBJECTS> we can make
sure to only build TestMain.cpp and JavaScriptTestRunnerMain.cpp once.

Previously we built these cpp files into object files once for every
single test executable. This change reduces the number of total compile
jobs in a Serenity target build by around 100.
This commit is contained in:
Andrew Kaster 2021-07-27 00:19:08 -06:00 committed by Linus Groh
parent af9be6e093
commit de2bf3f333
2 changed files with 5 additions and 4 deletions

View file

@ -7,3 +7,6 @@ set(SOURCES
serenity_lib(LibTest test)
target_link_libraries(LibTest LibC)
add_library(LibTestMain OBJECT TestMain.cpp)
add_library(JavaScriptTestRunnerMain OBJECT JavaScriptTestRunnerMain.cpp)