From 7a0d7525f16e75771565e321475170f104c6c0d7 Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Wed, 28 Apr 2021 18:44:24 -0700 Subject: [PATCH] Build: Simplify LibGfx test's CMakeLists.txt with serenity_test(..) Now that everything is LibTest based, we can just use the normal pattern of iterating + serenity_test(..). --- Userland/Tests/LibGfx/CMakeLists.txt | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/Userland/Tests/LibGfx/CMakeLists.txt b/Userland/Tests/LibGfx/CMakeLists.txt index daeb330270..cee5cfbe62 100644 --- a/Userland/Tests/LibGfx/CMakeLists.txt +++ b/Userland/Tests/LibGfx/CMakeLists.txt @@ -1,16 +1,5 @@ -file(GLOB CMD_SOURCES CONFIGURE_DEPENDS "*.cpp") -list(REMOVE_ITEM CMD_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/BenchmarkGfxPainter.cpp) -list(REMOVE_ITEM CMD_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/TestImageDecoder.cpp) -list(REMOVE_ITEM CMD_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/TestFontHandling.cpp) +file(GLOB TEST_SOURCES CONFIGURE_DEPENDS "*.cpp") -# FIXME These tests do not use LibTest -foreach(CMD_SRC ${CMD_SOURCES}) - get_filename_component(CMD_NAME ${CMD_SRC} NAME_WE) - add_executable(${CMD_NAME} ${CMD_SRC}) - target_link_libraries(${CMD_NAME} LibCore LibGUI) - install(TARGETS ${CMD_NAME} RUNTIME DESTINATION usr/Tests/LibGfx) +foreach(source ${TEST_SOURCES}) + serenity_test(${source} LibGfx LIBS LibGUI) endforeach() - -serenity_test(TestFontHandling.cpp LibGfx LIBS LibGUI) -serenity_test(TestImageDecoder.cpp LibGfx LIBS LibGUI) -serenity_test(BenchmarkGfxPainter.cpp LibGfx LIBS LibGUI)