1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 10:18:15 +09: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:
Andrew Kaster 2022-07-04 08:48:19 -06:00 committed by Andreas Kling
parent 02e8f29560
commit 2b29e611fe
Notes: sideshowbarker 2024-07-17 09:40:05 +09:00
8 changed files with 136 additions and 138 deletions

View file

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

View file

@ -3,73 +3,73 @@ function(add_simple_fuzzer name)
if (ENABLE_FUZZERS_OSSFUZZ) if (ENABLE_FUZZERS_OSSFUZZ)
target_link_libraries(${name} target_link_libraries(${name}
PUBLIC ${ARGN} LagomCore) PUBLIC ${ARGN} LibCore)
elseif (ENABLE_FUZZERS_LIBFUZZER) elseif (ENABLE_FUZZERS_LIBFUZZER)
target_compile_options(${name} target_compile_options(${name}
PRIVATE $<$<CXX_COMPILER_ID:Clang>:-g -O1 -fsanitize=fuzzer> PRIVATE $<$<CXX_COMPILER_ID:Clang>:-g -O1 -fsanitize=fuzzer>
) )
target_link_libraries(${name} target_link_libraries(${name}
PUBLIC ${ARGN} LagomCore PUBLIC ${ARGN} LibCore
PRIVATE $<$<CXX_COMPILER_ID:Clang>:-fsanitize=fuzzer> PRIVATE $<$<CXX_COMPILER_ID:Clang>:-fsanitize=fuzzer>
) )
else() else()
target_sources(${name} PRIVATE "EntryShim.cpp") target_sources(${name} PRIVATE "EntryShim.cpp")
target_link_libraries(${name} PUBLIC ${ARGN} LagomCore) target_link_libraries(${name} PUBLIC ${ARGN} LibCore)
endif() endif()
endfunction() endfunction()
add_simple_fuzzer(FuzzBMPLoader LagomGfx) add_simple_fuzzer(FuzzBMPLoader LibGfx)
add_simple_fuzzer(FuzzBrotli LagomCompress) add_simple_fuzzer(FuzzBrotli LibCompress)
add_simple_fuzzer(FuzzCSSParser LagomWeb) add_simple_fuzzer(FuzzCSSParser LibWeb)
add_simple_fuzzer(FuzzCyrillicDecoder LagomTextCodec) add_simple_fuzzer(FuzzCyrillicDecoder LibTextCodec)
add_simple_fuzzer(FuzzDeflateCompression LagomCompress) add_simple_fuzzer(FuzzDeflateCompression LibCompress)
add_simple_fuzzer(FuzzDeflateDecompression LagomCompress) add_simple_fuzzer(FuzzDeflateDecompression LibCompress)
add_simple_fuzzer(FuzzELF LagomELF) add_simple_fuzzer(FuzzELF LibELF)
add_simple_fuzzer(FuzzFlacLoader LagomAudio) add_simple_fuzzer(FuzzFlacLoader LibAudio)
add_simple_fuzzer(FuzzGemini LagomGemini) add_simple_fuzzer(FuzzGemini LibGemini)
add_simple_fuzzer(FuzzGIFLoader LagomGfx) add_simple_fuzzer(FuzzGIFLoader LibGfx)
add_simple_fuzzer(FuzzGzipCompression LagomCompress) add_simple_fuzzer(FuzzGzipCompression LibCompress)
add_simple_fuzzer(FuzzGzipDecompression LagomCompress) add_simple_fuzzer(FuzzGzipDecompression LibCompress)
add_simple_fuzzer(FuzzICOLoader LagomGfx) add_simple_fuzzer(FuzzICOLoader LibGfx)
add_simple_fuzzer(FuzzJPGLoader LagomGfx) add_simple_fuzzer(FuzzJPGLoader LibGfx)
add_simple_fuzzer(FuzzMD5 LagomCrypto) add_simple_fuzzer(FuzzMD5 LibCrypto)
add_simple_fuzzer(FuzzMP3Loader LagomAudio) add_simple_fuzzer(FuzzMP3Loader LibAudio)
add_simple_fuzzer(FuzzPEM LagomCrypto) add_simple_fuzzer(FuzzPEM LibCrypto)
add_simple_fuzzer(FuzzPNGLoader LagomGfx) add_simple_fuzzer(FuzzPNGLoader LibGfx)
add_simple_fuzzer(FuzzPBMLoader LagomGfx) add_simple_fuzzer(FuzzPBMLoader LibGfx)
add_simple_fuzzer(FuzzPGMLoader LagomGfx) add_simple_fuzzer(FuzzPGMLoader LibGfx)
add_simple_fuzzer(FuzzPoly1305 LagomCrypto) add_simple_fuzzer(FuzzPoly1305 LibCrypto)
add_simple_fuzzer(FuzzPPMLoader LagomGfx) add_simple_fuzzer(FuzzPPMLoader LibGfx)
add_simple_fuzzer(FuzzPDF LagomPDF) add_simple_fuzzer(FuzzPDF LibPDF)
add_simple_fuzzer(FuzzQOILoader LagomGfx) add_simple_fuzzer(FuzzQOILoader LibGfx)
add_simple_fuzzer(FuzzQuotedPrintableParser LagomIMAP) add_simple_fuzzer(FuzzQuotedPrintableParser LibIMAP)
add_simple_fuzzer(FuzzHebrewDecoder LagomTextCodec) add_simple_fuzzer(FuzzHebrewDecoder LibTextCodec)
add_simple_fuzzer(FuzzHttpRequest LagomHTTP) add_simple_fuzzer(FuzzHttpRequest LibHTTP)
add_simple_fuzzer(FuzzIMAPParser LagomIMAP) add_simple_fuzzer(FuzzIMAPParser LibIMAP)
add_simple_fuzzer(FuzzJs LagomJS) add_simple_fuzzer(FuzzJs LibJS)
add_simple_fuzzer(FuzzLatin1Decoder LagomTextCodec) add_simple_fuzzer(FuzzLatin1Decoder LibTextCodec)
add_simple_fuzzer(FuzzLatin2Decoder LagomTextCodec) add_simple_fuzzer(FuzzLatin2Decoder LibTextCodec)
add_simple_fuzzer(FuzzMarkdown LagomMarkdown) add_simple_fuzzer(FuzzMarkdown LibMarkdown)
add_simple_fuzzer(FuzzRegexECMA262 LagomRegex) add_simple_fuzzer(FuzzRegexECMA262 LibRegex)
add_simple_fuzzer(FuzzRegexPosixBasic LagomRegex) add_simple_fuzzer(FuzzRegexPosixBasic LibRegex)
add_simple_fuzzer(FuzzRegexPosixExtended LagomRegex) add_simple_fuzzer(FuzzRegexPosixExtended LibRegex)
add_simple_fuzzer(FuzzASN1 LagomCrypto LagomTLS) add_simple_fuzzer(FuzzASN1 LibCrypto LibTLS)
add_simple_fuzzer(FuzzSHA1 LagomCrypto) add_simple_fuzzer(FuzzSHA1 LibCrypto)
add_simple_fuzzer(FuzzSHA256 LagomCrypto) add_simple_fuzzer(FuzzSHA256 LibCrypto)
add_simple_fuzzer(FuzzSHA384 LagomCrypto) add_simple_fuzzer(FuzzSHA384 LibCrypto)
add_simple_fuzzer(FuzzSHA512 LagomCrypto) add_simple_fuzzer(FuzzSHA512 LibCrypto)
add_simple_fuzzer(FuzzShell LagomShell) add_simple_fuzzer(FuzzShell LibShell)
add_simple_fuzzer(FuzzSQLParser LagomSQL) add_simple_fuzzer(FuzzSQLParser LibSQL)
add_simple_fuzzer(FuzzTTF LagomGfx) add_simple_fuzzer(FuzzTTF LibGfx)
add_simple_fuzzer(FuzzURL) add_simple_fuzzer(FuzzURL)
add_simple_fuzzer(FuzzUTF16BEDecoder LagomTextCodec) add_simple_fuzzer(FuzzUTF16BEDecoder LibTextCodec)
add_simple_fuzzer(FuzzRSAKeyParsing LagomCrypto) add_simple_fuzzer(FuzzRSAKeyParsing LibCrypto)
add_simple_fuzzer(FuzzWAVLoader LagomAudio) add_simple_fuzzer(FuzzWAVLoader LibAudio)
add_simple_fuzzer(FuzzWasmParser LagomWasm) add_simple_fuzzer(FuzzWasmParser LibWasm)
add_simple_fuzzer(FuzzWOFF LagomGfx) add_simple_fuzzer(FuzzWOFF LibGfx)
add_simple_fuzzer(FuzzXML LagomXML) add_simple_fuzzer(FuzzXML LibXML)
add_simple_fuzzer(FuzzZip LagomArchive) add_simple_fuzzer(FuzzZip LibArchive)
add_simple_fuzzer(FuzzZlibDecompression LagomCompress) add_simple_fuzzer(FuzzZlibDecompression LibCompress)
if (ENABLE_FUZZERS_LIBFUZZER) if (ENABLE_FUZZERS_LIBFUZZER)
set(CMAKE_EXE_LINKER_FLAGS "${ORIGINAL_CMAKE_EXE_LINKER_FLAGS} -fsanitize=address") set(CMAKE_EXE_LINKER_FLAGS "${ORIGINAL_CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
@ -80,7 +80,7 @@ target_compile_options(FuzzilliJs
PRIVATE $<$<CXX_COMPILER_ID:Clang>:-g -O1 -fsanitize-coverage=trace-pc-guard> PRIVATE $<$<CXX_COMPILER_ID:Clang>:-g -O1 -fsanitize-coverage=trace-pc-guard>
) )
target_link_libraries(FuzzilliJs target_link_libraries(FuzzilliJs
PUBLIC LagomCore LagomJS PUBLIC LibCore LibJS
PRIVATE $<$<CXX_COMPILER_ID:Clang>:-fsanitize-coverage=trace-pc-guard> PRIVATE $<$<CXX_COMPILER_ID:Clang>:-fsanitize-coverage=trace-pc-guard>
) )
endif() endif()

View file

@ -3,7 +3,7 @@ function(lagom_tool tool)
add_executable(${tool} ${SOURCES} ${LAGOM_TOOL_SOURCES}) add_executable(${tool} ${SOURCES} ${LAGOM_TOOL_SOURCES})
# alias for parity with exports # alias for parity with exports
add_executable(Lagom::${tool} ALIAS ${tool}) add_executable(Lagom::${tool} ALIAS ${tool})
target_link_libraries(${tool} LagomCore ${LAGOM_TOOL_LIBS}) target_link_libraries(${tool} LibCore ${LAGOM_TOOL_LIBS})
install( install(
TARGETS ${tool} TARGETS ${tool}
EXPORT LagomTargets EXPORT LagomTargets

View file

@ -2,4 +2,4 @@ set(SOURCES
main.cpp main.cpp
) )
lagom_tool(IPCCompiler LIBS LagomMain) lagom_tool(IPCCompiler LIBS LibMain)

View file

@ -1 +1 @@
lagom_tool(GeneratePnpIDsData SOURCES GeneratePnpIDs.cpp LIBS LagomMain) lagom_tool(GeneratePnpIDsData SOURCES GeneratePnpIDs.cpp LIBS LibMain)

View file

@ -1 +1 @@
lagom_tool(GenerateTimeZoneData SOURCES GenerateTimeZoneData.cpp LIBS LagomMain) lagom_tool(GenerateTimeZoneData SOURCES GenerateTimeZoneData.cpp LIBS LibMain)

View file

@ -1,5 +1,5 @@
lagom_tool(GenerateUnicodeData SOURCES GenerateUnicodeData.cpp LIBS LagomMain) lagom_tool(GenerateUnicodeData SOURCES GenerateUnicodeData.cpp LIBS LibMain)
lagom_tool(GenerateUnicodeDateTimeFormat SOURCES GenerateUnicodeDateTimeFormat.cpp LIBS LagomMain LagomTimeZone) lagom_tool(GenerateUnicodeDateTimeFormat SOURCES GenerateUnicodeDateTimeFormat.cpp LIBS LibMain LibTimeZone)
lagom_tool(GenerateUnicodeLocale SOURCES GenerateUnicodeLocale.cpp LIBS LagomMain) lagom_tool(GenerateUnicodeLocale SOURCES GenerateUnicodeLocale.cpp LIBS LibMain)
lagom_tool(GenerateUnicodeNumberFormat SOURCES GenerateUnicodeNumberFormat.cpp LIBS LagomMain) lagom_tool(GenerateUnicodeNumberFormat SOURCES GenerateUnicodeNumberFormat.cpp LIBS LibMain)
lagom_tool(GenerateUnicodeRelativeTimeFormat SOURCES GenerateUnicodeRelativeTimeFormat.cpp LIBS LagomMain) lagom_tool(GenerateUnicodeRelativeTimeFormat SOURCES GenerateUnicodeRelativeTimeFormat.cpp LIBS LibMain)

View file

@ -1,9 +1,9 @@
set(SOURCES "") # avoid pulling SOURCES from parent scope set(SOURCES "") # avoid pulling SOURCES from parent scope
lagom_tool(GenerateCSSEnums SOURCES GenerateCSSEnums.cpp LIBS LagomMain) lagom_tool(GenerateCSSEnums SOURCES GenerateCSSEnums.cpp LIBS LibMain)
lagom_tool(GenerateCSSMediaFeatureID SOURCES GenerateCSSMediaFeatureID.cpp LIBS LagomMain) lagom_tool(GenerateCSSMediaFeatureID SOURCES GenerateCSSMediaFeatureID.cpp LIBS LibMain)
lagom_tool(GenerateCSSPropertyID SOURCES GenerateCSSPropertyID.cpp LIBS LagomMain) lagom_tool(GenerateCSSPropertyID SOURCES GenerateCSSPropertyID.cpp LIBS LibMain)
lagom_tool(GenerateCSSTransformFunctions SOURCES GenerateCSSTransformFunctions.cpp LIBS LagomMain) lagom_tool(GenerateCSSTransformFunctions SOURCES GenerateCSSTransformFunctions.cpp LIBS LibMain)
lagom_tool(GenerateCSSValueID SOURCES GenerateCSSValueID.cpp LIBS LagomMain) lagom_tool(GenerateCSSValueID SOURCES GenerateCSSValueID.cpp LIBS LibMain)
add_subdirectory(WrapperGenerator) add_subdirectory(WrapperGenerator)