Files
pdf/engine/tests/CMakeLists.txt
T
2026-05-25 10:34:39 +05:30

38 lines
1.0 KiB
CMake

# Engine test suite. Phase 0: a single smoke test that backs Gate G0.
add_executable(pdfengine_smoke
smoke_test.cpp
fonts_test.cpp
graphics_state_test.cpp
display_list_test.cpp
document_test.cpp
skia_renderer_test.cpp
)
target_link_libraries(pdfengine_smoke
PRIVATE
pdfengine::pdfengine
GTest::gtest
GTest::gtest_main
)
if(PDFENGINE_WITH_SKIA)
target_link_libraries(pdfengine_smoke PRIVATE skia::skia)
endif()
target_include_directories(pdfengine_smoke
PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/../src"
)
# Locate and normalize corpus path
set(TEST_CORPUS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../corpus" CACHE PATH "Path to test corpus")
file(TO_CMAKE_PATH "${TEST_CORPUS_DIR}" TEST_CORPUS_DIR_NORM)
target_compile_definitions(pdfengine_smoke PRIVATE TEST_CORPUS_DIR="${TEST_CORPUS_DIR_NORM}")
pdfengine_set_warnings(pdfengine_smoke)
pdfengine_enable_sanitizers(pdfengine_smoke)
# Registers each TEST() with CTest so `ctest --preset ...` runs them.
gtest_discover_tests(pdfengine_smoke)