mirror of
https://github.com/RGBCube/serenity
synced 2025-07-29 09:27:46 +00:00
Meta: Rename Lagom library target names from LagomFoo to LibFoo
This matches the target names for the main serenity build, and will make simplifying the Lagom build much easier going forward. The LagomFoo name came from a time when we had both library builds in the same CMake generated project and needed to deconflict the names.
This commit is contained in:
parent
02e8f29560
commit
2b29e611fe
8 changed files with 136 additions and 138 deletions
|
@ -167,7 +167,7 @@ install(
|
|||
|
||||
function(lagom_lib library fs_name)
|
||||
cmake_parse_arguments(LAGOM_LIBRARY "" "" "SOURCES;LIBS" ${ARGN})
|
||||
set(target_name "Lagom${library}")
|
||||
set(target_name "Lib${library}")
|
||||
add_library(${target_name} ${LAGOM_LIBRARY_SOURCES})
|
||||
|
||||
# Don't make alias when we're going to import a previous build for Tools
|
||||
|
@ -185,8 +185,8 @@ function(lagom_lib library fs_name)
|
|||
OUTPUT_NAME lagom-${fs_name}
|
||||
)
|
||||
target_link_libraries(${target_name} ${LAGOM_LIBRARY_LIBS})
|
||||
if (NOT ${target_name} STREQUAL "LagomCore")
|
||||
target_link_libraries(${target_name} LagomCore)
|
||||
if (NOT ${target_name} STREQUAL "LibCore")
|
||||
target_link_libraries(${target_name} LibCore)
|
||||
endif()
|
||||
install(
|
||||
TARGETS ${target_name}
|
||||
|
@ -214,7 +214,7 @@ function(lagom_test source)
|
|||
get_filename_component(name ${source} NAME_WE)
|
||||
add_executable(${name}_lagom ${source})
|
||||
set_target_properties(${name}_lagom PROPERTIES OUTPUT_NAME ${name})
|
||||
target_link_libraries(${name}_lagom LagomCore LagomTest LagomTestMain ${LAGOM_TEST_LIBS})
|
||||
target_link_libraries(${name}_lagom LibCore LibTest LibTestMain ${LAGOM_TEST_LIBS})
|
||||
add_test(
|
||||
NAME ${name}
|
||||
COMMAND ${name}_lagom
|
||||
|
@ -227,38 +227,36 @@ if (NOT TARGET all_generated)
|
|||
add_custom_target(all_generated)
|
||||
endif()
|
||||
|
||||
# AK/Core
|
||||
# Note: AK is included in LagomCore for the host build instead of LibC per the target build
|
||||
# AK/LibCore
|
||||
# Note: AK is included in LibCore for the host build instead of LibC per the target build
|
||||
file(GLOB AK_SOURCES CONFIGURE_DEPENDS "../../AK/*.cpp")
|
||||
file(GLOB LIBCORE_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibCore/*.cpp")
|
||||
lagom_lib(Core core
|
||||
SOURCES ${AK_SOURCES} ${LIBCORE_SOURCES}
|
||||
LIBS Threads::Threads
|
||||
)
|
||||
if (APPLE OR ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
||||
target_link_libraries(LagomCore) # Core::Account uses crypt() but it's not in libcrypt on macOS
|
||||
else()
|
||||
target_link_libraries(LagomCore crypt)
|
||||
if (NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
||||
target_link_libraries(LibCore crypt) # LibCore::Account uses crypt() but it's not in libcrypt on macOS
|
||||
endif()
|
||||
|
||||
# Main
|
||||
# LibMain
|
||||
file(GLOB LIBMAIN_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibMain/*.cpp")
|
||||
lagom_lib(Main main
|
||||
SOURCES ${LIBMAIN_SOURCES}
|
||||
)
|
||||
# The macOS linker is not happy about LibMain's main() calling an undefined symbol (serenity_main()).
|
||||
if (APPLE)
|
||||
target_link_options(LagomMain PRIVATE -undefined dynamic_lookup)
|
||||
target_link_options(LibMain PRIVATE -undefined dynamic_lookup)
|
||||
endif()
|
||||
|
||||
# TimeZone
|
||||
# LibTimeZone
|
||||
# This is needed even if Lagom is not enabled because it is depended upon by code generators.
|
||||
include(time_zone_data)
|
||||
file(GLOB LIBTIMEZONE_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibTimeZone/*.cpp")
|
||||
lagom_lib(TimeZone timezone
|
||||
SOURCES ${LIBTIMEZONE_SOURCES} ${TIME_ZONE_DATA_SOURCES}
|
||||
)
|
||||
target_compile_definitions(LagomTimeZone PRIVATE ENABLE_TIME_ZONE_DATA=$<BOOL:${ENABLE_TIME_ZONE_DATABASE_DOWNLOAD}>)
|
||||
target_compile_definitions(LibTimeZone PRIVATE ENABLE_TIME_ZONE_DATA=$<BOOL:${ENABLE_TIME_ZONE_DATABASE_DOWNLOAD}>)
|
||||
|
||||
# Manually install AK headers
|
||||
install(
|
||||
|
@ -297,7 +295,7 @@ if (BUILD_LAGOM)
|
|||
file(GLOB LIBCOMPRESS_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibCompress/*.cpp")
|
||||
lagom_lib(Compress compress
|
||||
SOURCES ${LIBCOMPRESS_SOURCES}
|
||||
LIBS LagomCrypto
|
||||
LIBS LibCrypto
|
||||
)
|
||||
|
||||
# Crypto
|
||||
|
@ -324,7 +322,7 @@ if (BUILD_LAGOM)
|
|||
file(GLOB LIBGEMINI_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibGemini/*.cpp")
|
||||
lagom_lib(Gemini gemini
|
||||
SOURCES ${LIBGEMINI_SOURCES}
|
||||
LIBS LagomTLS
|
||||
LIBS LibTLS
|
||||
)
|
||||
|
||||
# Gfx
|
||||
|
@ -335,7 +333,7 @@ if (BUILD_LAGOM)
|
|||
file(GLOB LIBGFX_WOFF_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibGfx/Font/WOFF/*.cpp")
|
||||
lagom_lib(Gfx gfx
|
||||
SOURCES ${LIBGFX_SOURCES} ${LIBGFX_FILTER_SOURCES} ${LIBGFX_FONT_SOURCES} ${LIBGFX_TTF_SOURCES} ${LIBGFX_WOFF_SOURCES}
|
||||
LIBS m LagomCompress LagomTextCodec LagomIPC
|
||||
LIBS m LibCompress LibTextCodec LibIPC
|
||||
)
|
||||
|
||||
# GPU
|
||||
|
@ -350,28 +348,28 @@ if (BUILD_LAGOM)
|
|||
file(GLOB LIBGL_TEX_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibGL/Tex/*.cpp")
|
||||
lagom_lib(GL gl
|
||||
SOURCES ${LIBGL_SOURCES} ${LIBGL_TEX_SOURCES}
|
||||
LIBS m LagomGfx LagomGPU)
|
||||
LIBS m LibGfx LibGPU)
|
||||
|
||||
# GUI-GML
|
||||
file(GLOB LIBGUI_GML_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibGUI/GML/*.cpp")
|
||||
list(REMOVE_ITEM LIBGUI_GML_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/../../Userland/Libraries/LibGUI/GML/AutocompleteProvider.cpp")
|
||||
lagom_lib(GML gml
|
||||
SOURCES ${LIBGUI_GML_SOURCES}
|
||||
LIBS LagomSyntax
|
||||
LIBS LibSyntax
|
||||
)
|
||||
|
||||
# HTTP
|
||||
file(GLOB LIBHTTP_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibHTTP/*.cpp")
|
||||
lagom_lib(HTTP http
|
||||
SOURCES ${LIBHTTP_SOURCES}
|
||||
LIBS LagomCompress LagomTLS
|
||||
LIBS LibCompress LibTLS
|
||||
)
|
||||
|
||||
# IMAP
|
||||
file(GLOB LIBIMAP_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibIMAP/*.cpp")
|
||||
lagom_lib(IMAP imap
|
||||
SOURCES ${LIBIMAP_SOURCES}
|
||||
LIBS LagomTLS
|
||||
LIBS LibTLS
|
||||
)
|
||||
|
||||
# IPC
|
||||
|
@ -387,7 +385,7 @@ if (BUILD_LAGOM)
|
|||
list(REMOVE_ITEM LIBJS_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/../../Userland/Libraries/LibJS/SyntaxHighlighter.cpp")
|
||||
lagom_lib(JS js
|
||||
SOURCES ${LIBJS_SOURCES} ${LIBJS_SUBDIR_SOURCES} ${LIBJS_SUBSUBDIR_SOURCES}
|
||||
LIBS m LagomCrypto LagomRegex LagomUnicode LagomTextCodec
|
||||
LIBS m LibCrypto LibRegex LibUnicode LibTextCodec
|
||||
)
|
||||
|
||||
# Line
|
||||
|
@ -400,7 +398,7 @@ if (BUILD_LAGOM)
|
|||
file(GLOB LIBMARKDOWN_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibMarkdown/*.cpp")
|
||||
lagom_lib(Markdown markdown
|
||||
SOURCES ${LIBMARKDOWN_SOURCES}
|
||||
LIBS LagomJS
|
||||
LIBS LibJS
|
||||
)
|
||||
|
||||
# PDF
|
||||
|
@ -408,7 +406,7 @@ if (BUILD_LAGOM)
|
|||
file(GLOB LIBPDF_SUBDIR_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibPDF/*/*.cpp")
|
||||
lagom_lib(PDF pdf
|
||||
SOURCES ${LIBPDF_SOURCES} ${LIBPDF_SUBDIR_SOURCES}
|
||||
LIBS LagomGfx LagomIPC LagomTextCodec
|
||||
LIBS LibGfx LibIPC LibTextCodec
|
||||
)
|
||||
|
||||
# Regex
|
||||
|
@ -416,7 +414,7 @@ if (BUILD_LAGOM)
|
|||
file(GLOB LIBREGEX_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibRegex/*.cpp")
|
||||
lagom_lib(Regex regex
|
||||
SOURCES ${LIBREGEX_SOURCES} ${LIBREGEX_LIBC_SOURCES}
|
||||
LIBS LagomUnicode
|
||||
LIBS LibUnicode
|
||||
)
|
||||
|
||||
# Shell
|
||||
|
@ -425,14 +423,14 @@ if (BUILD_LAGOM)
|
|||
list(FILTER SHELL_SOURCES EXCLUDE REGEX ".*main.cpp$")
|
||||
lagom_lib(Shell shell
|
||||
SOURCES ${SHELL_SOURCES}
|
||||
LIBS LagomLine LagomRegex
|
||||
LIBS LibLine LibRegex
|
||||
)
|
||||
|
||||
# SoftGPU
|
||||
file(GLOB_RECURSE LIBSOFTGPU_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibSoftGPU/*.cpp")
|
||||
lagom_lib(SoftGPU softgpu
|
||||
SOURCES ${LIBSOFTGPU_SOURCES}
|
||||
LIBS m LagomGfx
|
||||
LIBS m LibGfx
|
||||
)
|
||||
|
||||
# Syntax
|
||||
|
@ -447,7 +445,7 @@ if (BUILD_LAGOM)
|
|||
list(REMOVE_ITEM LIBSQL_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/../../Userland/Libraries/LibSQL/SQLClient.cpp")
|
||||
lagom_lib(SQL sql
|
||||
SOURCES ${LIBSQL_SOURCES}
|
||||
LIBS LagomRegex
|
||||
LIBS LibRegex
|
||||
)
|
||||
|
||||
# TextCodec
|
||||
|
@ -460,7 +458,7 @@ if (BUILD_LAGOM)
|
|||
file(GLOB LIBTLS_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibTLS/*.cpp")
|
||||
lagom_lib(TLS tls
|
||||
SOURCES ${LIBTLS_SOURCES}
|
||||
LIBS LagomCrypto
|
||||
LIBS LibCrypto
|
||||
)
|
||||
|
||||
# Unicode
|
||||
|
@ -469,8 +467,8 @@ if (BUILD_LAGOM)
|
|||
lagom_lib(Unicode unicode
|
||||
SOURCES ${LIBUNICODE_SOURCES} ${UNICODE_DATA_SOURCES}
|
||||
)
|
||||
target_compile_definitions(LagomUnicode PRIVATE ENABLE_UNICODE_DATA=$<BOOL:${ENABLE_UNICODE_DATABASE_DOWNLOAD}>)
|
||||
target_link_libraries(LagomUnicode LagomTimeZone)
|
||||
target_compile_definitions(LibUnicode PRIVATE ENABLE_UNICODE_DATA=$<BOOL:${ENABLE_UNICODE_DATABASE_DOWNLOAD}>)
|
||||
target_link_libraries(LibUnicode LibTimeZone)
|
||||
|
||||
# WASM
|
||||
file(GLOB LIBWASM_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibWasm/*/*.cpp")
|
||||
|
@ -500,16 +498,16 @@ if (BUILD_LAGOM)
|
|||
|
||||
lagom_lib(Web web
|
||||
SOURCES ${LIBWEB_SOURCES} ${LIBWEB_SUBDIR_SOURCES} ${LIBWEB_SUBSUBDIR_SOURCES} ${LIBWEB_GENERATED_SOURCES}
|
||||
LIBS LagomMarkdown LagomGemini LagomGfx LagomGL LagomJS LagomTextCodec LagomWasm LagomXML
|
||||
LIBS LibMarkdown LibGemini LibGfx LibGL LibJS LibTextCodec LibWasm LibXML
|
||||
)
|
||||
generate_js_wrappers(LagomWeb)
|
||||
generate_js_wrappers(LibWeb)
|
||||
|
||||
# WebSocket
|
||||
file(GLOB LIBWEBSOCKET_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibWebSocket/*.cpp")
|
||||
file(GLOB LIBWEBSOCKET_SUBDIR_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibWebSocket/*/*.cpp")
|
||||
lagom_lib(WebSocket websocket
|
||||
SOURCES ${LIBWEBSOCKET_SOURCES} ${LIBWEBSOCKET_SUBDIR_SOURCES}
|
||||
LIBS LagomCrypto LagomTLS
|
||||
LIBS LibCrypto LibTLS
|
||||
)
|
||||
|
||||
# x86
|
||||
|
@ -529,68 +527,68 @@ if (BUILD_LAGOM)
|
|||
if (NOT ENABLE_FUZZERS AND NOT ENABLE_COMPILER_EXPLORER_BUILD)
|
||||
# Lagom Examples
|
||||
add_executable(TestApp TestApp.cpp)
|
||||
target_link_libraries(TestApp LagomCore)
|
||||
target_link_libraries(TestApp LibCore)
|
||||
|
||||
add_executable(TestJson TestJson.cpp)
|
||||
target_link_libraries(TestJson LagomCore)
|
||||
target_link_libraries(TestJson LibCore)
|
||||
|
||||
# Lagom Utilities
|
||||
add_executable(adjtime_lagom ../../Userland/Utilities/adjtime.cpp)
|
||||
set_target_properties(adjtime_lagom PROPERTIES OUTPUT_NAME adjtime)
|
||||
target_link_libraries(adjtime_lagom LagomCore LagomMain)
|
||||
target_link_libraries(adjtime_lagom LibCore LibMain)
|
||||
|
||||
# FIXME: Excluding arm64 is a temporary hack to circumvent a build problem
|
||||
# for Lagom on Apple M1
|
||||
if (NOT CMAKE_SYSTEM_PROCESSOR MATCHES "arm64")
|
||||
add_executable(disasm_lagom ../../Userland/Utilities/disasm.cpp)
|
||||
set_target_properties(disasm_lagom PROPERTIES OUTPUT_NAME disasm)
|
||||
target_link_libraries(disasm_lagom LagomCore LagomELF LagomX86 LagomMain)
|
||||
target_link_libraries(disasm_lagom LibCore LibELF LibX86 LibMain)
|
||||
endif()
|
||||
|
||||
add_executable(gml-format_lagom ../../Userland/Utilities/gml-format.cpp)
|
||||
set_target_properties(gml-format_lagom PROPERTIES OUTPUT_NAME gml-format)
|
||||
target_link_libraries(gml-format_lagom LagomCore LagomGML LagomMain)
|
||||
target_link_libraries(gml-format_lagom LibCore LibGML LibMain)
|
||||
|
||||
add_executable(headless_browser_lagom ../../Userland/Utilities/headless-browser.cpp)
|
||||
set_target_properties(headless_browser_lagom PROPERTIES OUTPUT_NAME headless-browser)
|
||||
target_link_libraries(headless_browser_lagom LagomWeb LagomWebSocket LagomHTTP LagomJS LagomGfx LagomMain)
|
||||
target_link_libraries(headless_browser_lagom LibWeb LibWebSocket LibHTTP LibJS LibGfx LibMain)
|
||||
|
||||
add_executable(js_lagom ../../Userland/Utilities/js.cpp)
|
||||
set_target_properties(js_lagom PROPERTIES OUTPUT_NAME js)
|
||||
target_link_libraries(js_lagom LagomJS LagomLine LagomMain Threads::Threads)
|
||||
target_link_libraries(js_lagom LibJS LibLine LibMain Threads::Threads)
|
||||
|
||||
add_executable(markdown-check_lagom ../../Userland/Utilities/markdown-check.cpp)
|
||||
set_target_properties(markdown-check_lagom PROPERTIES OUTPUT_NAME markdown-check)
|
||||
target_link_libraries(markdown-check_lagom LagomMarkdown LagomMain)
|
||||
target_link_libraries(markdown-check_lagom LibMarkdown LibMain)
|
||||
|
||||
add_executable(ntpquery_lagom ../../Userland/Utilities/ntpquery.cpp)
|
||||
set_target_properties(ntpquery_lagom PROPERTIES OUTPUT_NAME ntpquery)
|
||||
target_link_libraries(ntpquery_lagom LagomCore)
|
||||
target_link_libraries(ntpquery_lagom LibCore)
|
||||
|
||||
add_executable(shell_lagom ../../Userland/Shell/main.cpp)
|
||||
set_target_properties(shell_lagom PROPERTIES OUTPUT_NAME shell)
|
||||
target_link_libraries(shell_lagom LagomCore LagomShell LagomMain)
|
||||
target_link_libraries(shell_lagom LibCore LibShell LibMain)
|
||||
|
||||
add_executable(wasm_lagom ../../Userland/Utilities/wasm.cpp)
|
||||
set_target_properties(wasm_lagom PROPERTIES OUTPUT_NAME wasm)
|
||||
target_link_libraries(wasm_lagom LagomCore LagomWasm LagomLine LagomMain)
|
||||
target_link_libraries(wasm_lagom LibCore LibWasm LibLine LibMain)
|
||||
|
||||
add_executable(xml_lagom ../../Userland/Utilities/xml.cpp)
|
||||
set_target_properties(xml_lagom PROPERTIES OUTPUT_NAME xml)
|
||||
target_link_libraries(xml_lagom LagomCore LagomXML LagomMain)
|
||||
target_link_libraries(xml_lagom LibCore LibXML LibMain)
|
||||
|
||||
enable_testing()
|
||||
# LibTest
|
||||
file(GLOB LIBTEST_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibTest/*.cpp")
|
||||
list(FILTER LIBTEST_SOURCES EXCLUDE REGEX ".*Main.cpp$")
|
||||
add_library(
|
||||
LagomTest
|
||||
LibTest
|
||||
${LIBTEST_SOURCES}
|
||||
)
|
||||
target_link_libraries(LagomTest LagomCore)
|
||||
set_target_properties(LagomTest PROPERTIES OUTPUT_NAME lagom-test)
|
||||
target_link_libraries(LibTest LibCore)
|
||||
set_target_properties(LibTest PROPERTIES OUTPUT_NAME lagom-test)
|
||||
add_library(
|
||||
LagomTestMain
|
||||
LibTestMain
|
||||
OBJECT
|
||||
"${SERENITY_PROJECT_ROOT}/Userland/Libraries/LibTest/TestMain.cpp"
|
||||
)
|
||||
|
@ -602,33 +600,33 @@ if (BUILD_LAGOM)
|
|||
lagom_test(${source} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../Tests/AK)
|
||||
endforeach()
|
||||
|
||||
# Core
|
||||
# LibCore
|
||||
lagom_test(../../Tests/LibCore/TestLibCoreIODevice.cpp WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../Tests/LibCore)
|
||||
|
||||
# Crypto
|
||||
file(GLOB LIBCRYPTO_TESTS CONFIGURE_DEPENDS "../../Tests/LibCrypto/*.cpp")
|
||||
foreach(source ${LIBCRYPTO_TESTS})
|
||||
lagom_test(${source} LIBS LagomCrypto)
|
||||
lagom_test(${source} LIBS LibCrypto)
|
||||
endforeach()
|
||||
|
||||
# Compress
|
||||
file(COPY "${SERENITY_PROJECT_ROOT}/Tests/LibCompress/brotli-test-files" DESTINATION "./")
|
||||
file(GLOB LIBCOMPRESS_TESTS CONFIGURE_DEPENDS "../../Tests/LibCompress/*.cpp")
|
||||
foreach(source ${LIBCOMPRESS_TESTS})
|
||||
lagom_test(${source} LIBS LagomCompress)
|
||||
lagom_test(${source} LIBS LibCompress)
|
||||
endforeach()
|
||||
|
||||
# GL
|
||||
file(COPY "${SERENITY_PROJECT_ROOT}/Tests/LibGL/reference-images" DESTINATION "./")
|
||||
file(GLOB LIBGL_TESTS CONFIGURE_DEPENDS "../../Tests/LibGL/*.cpp")
|
||||
foreach(source ${LIBGL_TESTS})
|
||||
lagom_test(${source} WORKING_DIRECTORY LIBS LagomGL LagomGPU LagomSoftGPU)
|
||||
lagom_test(${source} WORKING_DIRECTORY LIBS LibGL LibGPU LibSoftGPU)
|
||||
endforeach()
|
||||
|
||||
# PDF
|
||||
file(GLOB LIBPDF_TESTS CONFIGURE_DEPENDS "../../Tests/LibPDF/*.cpp")
|
||||
foreach(source ${LIBPDF_TESTS})
|
||||
lagom_test(${source} LIBS LagomPDF WORKING_DIRECTORY ${SERENITY_PROJECT_ROOT}/Base/home/anon/Documents/pdf/)
|
||||
lagom_test(${source} LIBS LibPDF WORKING_DIRECTORY ${SERENITY_PROJECT_ROOT}/Base/home/anon/Documents/pdf/)
|
||||
endforeach()
|
||||
|
||||
# Regex
|
||||
|
@ -637,39 +635,39 @@ if (BUILD_LAGOM)
|
|||
# It is therefore not reasonable to run it on Lagom
|
||||
list(REMOVE_ITEM LIBREGEX_TESTS "${CMAKE_CURRENT_SOURCE_DIR}/../../Tests/LibRegex/RegexLibC.cpp")
|
||||
foreach(source ${LIBREGEX_TESTS})
|
||||
lagom_test(${source} LIBS LagomRegex)
|
||||
lagom_test(${source} LIBS LibRegex)
|
||||
endforeach()
|
||||
|
||||
# SQL
|
||||
file(GLOB LIBSQL_TEST_SOURCES CONFIGURE_DEPENDS "../../Tests/LibSQL/*.cpp")
|
||||
foreach(source ${LIBSQL_TEST_SOURCES})
|
||||
lagom_test(${source} LIBS LagomSQL)
|
||||
lagom_test(${source} LIBS LibSQL)
|
||||
endforeach()
|
||||
|
||||
# TextCodec
|
||||
file(GLOB LIBTEXTCODEC_TESTS CONFIGURE_DEPENDS "../../Tests/LibTextCodec/*.cpp")
|
||||
foreach(source ${LIBTEXTCODEC_TESTS})
|
||||
lagom_test(${source} LIBS LagomTextCodec
|
||||
lagom_test(${source} LIBS LibTextCodec
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../Tests/LibTextCodec)
|
||||
endforeach()
|
||||
|
||||
# TLS
|
||||
file(GLOB LIBTLS_TESTS CONFIGURE_DEPENDS "../../Tests/LibTLS/*.cpp")
|
||||
foreach(source ${LIBTLS_TESTS})
|
||||
lagom_test(${source} LIBS LagomTLS
|
||||
lagom_test(${source} LIBS LibTLS
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../Tests/LibTLS)
|
||||
endforeach()
|
||||
|
||||
# TTF
|
||||
file(GLOB LIBTTF_TESTS CONFIGURE_DEPENDS "../../Tests/LibTTF/*.cpp")
|
||||
foreach(source ${LIBTTF_TESTS})
|
||||
lagom_test(${source} LIBS LagomGfx)
|
||||
lagom_test(${source} LIBS LibGfx)
|
||||
endforeach()
|
||||
|
||||
# TimeZone
|
||||
# LibTimeZone
|
||||
file(GLOB LIBTIMEZONE_TEST_SOURCES CONFIGURE_DEPENDS "../../Tests/LibTimeZone/*.cpp")
|
||||
foreach(source ${LIBTIMEZONE_TEST_SOURCES})
|
||||
lagom_test(${source} LIBS LagomTimeZone)
|
||||
lagom_test(${source} LIBS LibTimeZone)
|
||||
|
||||
get_filename_component(target "${source}" NAME_WLE)
|
||||
target_compile_definitions("${target}_lagom" PRIVATE ENABLE_TIME_ZONE_DATA=$<BOOL:${ENABLE_TIME_ZONE_DATABASE_DOWNLOAD}>)
|
||||
|
@ -678,7 +676,7 @@ if (BUILD_LAGOM)
|
|||
# Unicode
|
||||
file(GLOB LIBUNICODE_TEST_SOURCES CONFIGURE_DEPENDS "../../Tests/LibUnicode/*.cpp")
|
||||
foreach(source ${LIBUNICODE_TEST_SOURCES})
|
||||
lagom_test(${source} LIBS LagomUnicode)
|
||||
lagom_test(${source} LIBS LibUnicode)
|
||||
endforeach()
|
||||
|
||||
# JavaScriptTestRunner + LibTest tests
|
||||
|
@ -687,7 +685,7 @@ if (BUILD_LAGOM)
|
|||
../../Tests/LibJS/test-js.cpp
|
||||
../../Userland/Libraries/LibTest/JavaScriptTestRunnerMain.cpp)
|
||||
set_target_properties(test-js_lagom PROPERTIES OUTPUT_NAME test-js)
|
||||
target_link_libraries(test-js_lagom LagomCore LagomTest LagomJS)
|
||||
target_link_libraries(test-js_lagom LibCore LibTest LibJS)
|
||||
add_test(
|
||||
NAME JS
|
||||
COMMAND test-js_lagom --show-progress=false
|
||||
|
@ -695,15 +693,15 @@ if (BUILD_LAGOM)
|
|||
set_tests_properties(JS PROPERTIES ENVIRONMENT SERENITY_SOURCE_DIR=${SERENITY_PROJECT_ROOT})
|
||||
|
||||
# Extra tests from Tests/LibJS
|
||||
lagom_test(../../Tests/LibJS/test-invalid-unicode-js.cpp LIBS LagomJS)
|
||||
lagom_test(../../Tests/LibJS/test-bytecode-js.cpp LIBS LagomJS)
|
||||
lagom_test(../../Tests/LibJS/test-invalid-unicode-js.cpp LIBS LibJS)
|
||||
lagom_test(../../Tests/LibJS/test-bytecode-js.cpp LIBS LibJS)
|
||||
|
||||
# Spreadsheet
|
||||
add_executable(test-spreadsheet_lagom
|
||||
../../Tests/Spreadsheet/test-spreadsheet.cpp
|
||||
../../Userland/Libraries/LibTest/JavaScriptTestRunnerMain.cpp)
|
||||
set_target_properties(test-spreadsheet_lagom PROPERTIES OUTPUT_NAME test-spreadsheet)
|
||||
target_link_libraries(test-spreadsheet_lagom LagomCore LagomTest LagomJS)
|
||||
target_link_libraries(test-spreadsheet_lagom LibCore LibTest LibJS)
|
||||
add_test(
|
||||
NAME Spreadsheet
|
||||
COMMAND test-spreadsheet_lagom --show-progress=false
|
||||
|
@ -715,7 +713,7 @@ if (BUILD_LAGOM)
|
|||
include(commonmark_spec)
|
||||
file(GLOB LIBMARKDOWN_TEST_SOURCES CONFIGURE_DEPENDS "../../Tests/LibMarkdown/*.cpp")
|
||||
foreach(source ${LIBMARKDOWN_TEST_SOURCES})
|
||||
lagom_test(${source} LIBS LagomMarkdown)
|
||||
lagom_test(${source} LIBS LibMarkdown)
|
||||
endforeach()
|
||||
set_tests_properties(TestCommonmark PROPERTIES DISABLED YES)
|
||||
|
||||
|
@ -724,7 +722,7 @@ if (BUILD_LAGOM)
|
|||
../../Tests/LibWasm/test-wasm.cpp
|
||||
../../Userland/Libraries/LibTest/JavaScriptTestRunnerMain.cpp)
|
||||
set_target_properties(test-wasm_lagom PROPERTIES OUTPUT_NAME test-wasm)
|
||||
target_link_libraries(test-wasm_lagom LagomCore LagomTest LagomWasm LagomJS)
|
||||
target_link_libraries(test-wasm_lagom LibCore LibTest LibWasm LibJS)
|
||||
add_test(
|
||||
NAME WasmParser
|
||||
COMMAND test-wasm_lagom --show-progress=false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue