ladybird/Tests/LibCore/CMakeLists.txt
R-Goc 02bb892d7a LibThreading/LibSync: Split out sync primitives
This commit splits out synchronization primitives from LibThreading into
LibSync. This is because LibThreading depends on LibCore, while LibCore
needs the synchronization primitives from LibThreading. This worked
while they were header only, but when I tried to add an implementation
file it ran into the circular dependency. To abstract away the pthread
implementation using cpp files is necessary so the synchronization
primitives were moved to a separate library.
2026-05-08 18:58:35 -05:00

31 lines
930 B
CMake

set(TEST_SOURCES
TestLibCoreAnonymousBuffer.cpp
TestLibCoreArgsParser.cpp
TestLibCoreDeferredInvoke.cpp
TestLibCoreEventLoop.cpp
TestLibCoreMappedFile.cpp
TestLibCoreMimeType.cpp
TestLibCorePromise.cpp
TestLibCoreStream.cpp
)
# FIXME: Change these tests to use a portable tempfile directory
if (LINUX)
list(APPEND TEST_SOURCES
TestLibCoreFileWatcher.cpp
)
endif()
foreach(source IN LISTS TEST_SOURCES)
ladybird_test("${source}" LibCore)
endforeach()
target_link_libraries(TestLibCorePromise PRIVATE LibSync LibThreading)
target_link_libraries(TestLibCoreStream PRIVATE LibSync LibThreading)
if(NOT WIN32)
# These tests use the .txt files in the current directory
set_tests_properties(TestLibCoreMappedFile TestLibCoreStream PROPERTIES WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
endif()
target_link_libraries(TestLibCoreEventLoop PRIVATE LibSync LibThreading)