1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 14:05:08 +00:00
serenity/Userland/Libraries/LibTimeZone/CMakeLists.txt
Andrew Kaster 5120b39d0e Meta+Userland: Add ENABLE_USERSPACE_COVERAGE_COLLECTION CMake option
This option sets -fprofile-instr-generate -fcoverage-mapping for Clang
builds only on almost all of Userland. Loader and LibTimeZone are
exempt. This can be used for generating code coverage reports, or even
PGO in the future.
2022-05-02 01:46:18 +02:00

13 lines
548 B
CMake

include(${SerenityOS_SOURCE_DIR}/Meta/CMake/time_zone_data.cmake)
set(SOURCES
TimeZone.cpp
${TIME_ZONE_DATA_SOURCES}
)
add_library(LibTimeZone OBJECT ${SOURCES})
target_compile_definitions(LibTimeZone PRIVATE ENABLE_TIME_ZONE_DATA=$<BOOL:${ENABLE_TIME_ZONE_DATABASE_DOWNLOAD}>)
# NOTE: These objects are used by the DynamicLoader, which is always built without coverage instrumentation.
# We could allow them to be instrumented for coverage if DynamicLoader built its own copy
target_link_libraries(LibTimeZone PRIVATE NoCoverage)