mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:07:45 +00:00
Everywhere: Mark dependencies of most targets as PRIVATE
Otherwise, we end up propagating those dependencies into targets that link against that library, which creates unnecessary link-time dependencies. Also included are changes to readd now missing dependencies to tools that actually need them.
This commit is contained in:
parent
678db534ff
commit
ce2f1b845f
174 changed files with 386 additions and 384 deletions
|
@ -25,11 +25,13 @@ set(TEST_SOURCES
|
|||
foreach(source IN LISTS TEST_SOURCES)
|
||||
get_filename_component(test_name "${source}" NAME_WE)
|
||||
add_executable("${test_name}" "${source}")
|
||||
target_link_libraries("${test_name}" LibCore)
|
||||
target_link_libraries("${test_name}" PRIVATE LibCore)
|
||||
serenity_set_implicit_links("${test_name}")
|
||||
install(TARGETS "${test_name}" RUNTIME DESTINATION usr/Tests/Kernel/Legacy)
|
||||
endforeach()
|
||||
|
||||
target_link_libraries(fuzz-syscalls PRIVATE LibSystem)
|
||||
|
||||
serenity_test("crash.cpp" Kernel MAIN_ALREADY_DEFINED)
|
||||
|
||||
set(LIBTEST_BASED_SOURCES
|
||||
|
|
|
@ -13,7 +13,7 @@ foreach(source IN LISTS TEST_SOURCES)
|
|||
endforeach()
|
||||
|
||||
# NOTE: Required because of the LocalServer tests
|
||||
target_link_libraries(TestLibCoreStream LibThreading)
|
||||
target_link_libraries(TestLibCoreSharedSingleProducerCircularQueue LibThreading)
|
||||
target_link_libraries(TestLibCoreStream PRIVATE LibThreading)
|
||||
target_link_libraries(TestLibCoreSharedSingleProducerCircularQueue PRIVATE LibThreading)
|
||||
|
||||
install(FILES long_lines.txt 10kb.txt small.txt DESTINATION usr/Tests/LibCore)
|
||||
|
|
|
@ -3,7 +3,7 @@ macro(add_dlopen_lib NAME FUNCTION)
|
|||
add_library(${NAME} SHARED Dynlib.cpp)
|
||||
target_compile_definitions(${NAME} PRIVATE -DFUNCTION=${FUNCTION})
|
||||
# LibLine is not special, just an "external" dependency
|
||||
target_link_libraries(${NAME} LibLine)
|
||||
target_link_libraries(${NAME} PRIVATE LibLine)
|
||||
serenity_set_implicit_links(${NAME})
|
||||
# Avoid execution by the test runner
|
||||
install(TARGETS ${NAME}
|
||||
|
@ -16,7 +16,7 @@ add_dlopen_lib(DynlibB dynlibb_function)
|
|||
add_dlopen_lib(DynlibC dynlibc_function)
|
||||
set(CMAKE_INSTALL_RPATH $ORIGIN)
|
||||
add_dlopen_lib(DynlibD dynlibd_function)
|
||||
target_link_libraries(DynlibD DynlibC)
|
||||
target_link_libraries(DynlibD PRIVATE DynlibC)
|
||||
unset(CMAKE_INSTALL_RPATH)
|
||||
|
||||
set(TEST_SOURCES
|
||||
|
|
|
@ -4,7 +4,7 @@ set(TEST_SOURCES
|
|||
)
|
||||
|
||||
foreach(source IN LISTS TEST_SOURCES)
|
||||
serenity_test("${source}" LibGL LIBS LibCore LibGL)
|
||||
serenity_test("${source}" LibGL LIBS LibCore LibGfx LibGL)
|
||||
endforeach()
|
||||
|
||||
install(DIRECTORY reference-images DESTINATION usr/Tests/LibGL)
|
||||
|
|
|
@ -5,7 +5,7 @@ set(TEST_SOURCES
|
|||
)
|
||||
|
||||
foreach(source IN LISTS TEST_SOURCES)
|
||||
serenity_test("${source}" LibGfx LIBS LibGUI)
|
||||
serenity_test("${source}" LibGfx LIBS LibGfx LibGUI)
|
||||
endforeach()
|
||||
|
||||
install(FILES TestFont.font DESTINATION usr/Tests/LibGfx)
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
serenity_testjs_test(test-js.cpp test-js)
|
||||
serenity_testjs_test(test-js.cpp test-js LIBS LibLocale)
|
||||
|
||||
install(TARGETS test-js RUNTIME DESTINATION bin OPTIONAL)
|
||||
link_with_locale_data(test-js)
|
||||
|
||||
serenity_test(test-invalid-unicode-js.cpp LibJS LIBS LibJS)
|
||||
serenity_test(test-invalid-unicode-js.cpp LibJS LIBS LibJS LibLocale)
|
||||
link_with_locale_data(test-invalid-unicode-js)
|
||||
|
||||
serenity_test(test-bytecode-js.cpp LibJS LIBS LibJS)
|
||||
serenity_test(test-bytecode-js.cpp LibJS LIBS LibJS LibLocale)
|
||||
link_with_locale_data(test-bytecode-js)
|
||||
|
||||
serenity_test(test-value-js.cpp LibJS LIBS LibJS)
|
||||
serenity_test(test-value-js.cpp LibJS LIBS LibJS LibLocale)
|
||||
link_with_locale_data(test-value-js)
|
||||
|
||||
serenity_component(
|
||||
|
@ -17,7 +17,7 @@ serenity_component(
|
|||
TARGETS test262-runner
|
||||
)
|
||||
add_executable(test262-runner test262-runner.cpp)
|
||||
target_link_libraries(test262-runner LibJS LibCore)
|
||||
target_link_libraries(test262-runner PRIVATE LibJS LibCore LibLocale)
|
||||
serenity_set_implicit_links(test262-runner)
|
||||
link_with_locale_data(test262-runner)
|
||||
install(TARGETS test262-runner RUNTIME DESTINATION bin OPTIONAL)
|
||||
|
@ -27,6 +27,6 @@ serenity_component(
|
|||
TARGETS test-test262
|
||||
)
|
||||
add_executable(test-test262 test-test262.cpp)
|
||||
target_link_libraries(test-test262 LibMain LibCore)
|
||||
target_link_libraries(test-test262 PRIVATE LibMain LibCore)
|
||||
serenity_set_implicit_links(test-test262)
|
||||
install(TARGETS test-test262 RUNTIME DESTINATION bin OPTIONAL)
|
||||
|
|
|
@ -7,7 +7,7 @@ set(TEST_SOURCES
|
|||
foreach(source IN LISTS TEST_SOURCES)
|
||||
get_filename_component(test_name "${source}" NAME_WE)
|
||||
add_executable("${test_name}" "${source}")
|
||||
target_link_libraries("${test_name}" LibCore)
|
||||
target_link_libraries("${test_name}" PRIVATE LibCore)
|
||||
serenity_set_implicit_links("${test_name}")
|
||||
install(TARGETS "${test_name}" RUNTIME DESTINATION usr/Tests/UserEmulator)
|
||||
endforeach()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue