Files
ConformalLabpp/code/tests/CMakeLists.txt
Tarik Moussa 6886803a29
Some checks failed
C++ Tests / test-fast (push) Successful in 2m12s
Mirror to Codeberg / mirror (push) Failing after 1s
C++ Tests / test-cgal (push) Failing after 1m52s
fix(ci): decouple CGAL tests from viewer — add WITH_CGAL_TESTS flag
Root cause: -DWITH_CGAL=ON implied -DWITH_VIEWER=ON, which pulled in
GLFW, which requires wayland-scanner — not present in the headless CI
container (ubuntu:22.04 ARM64).

Fix: new CMake option -DWITH_CGAL_TESTS=ON builds conformallab_cgal_tests
without touching the viewer, GLFW, libigl, or any display dependency.
Only Boost headers are required (already in the Docker image).

Changes
───────
code/CMakeLists.txt
  - Add WITH_CGAL_TESTS option (OFF by default)
  - find_package(Boost REQUIRED) now shared between WITH_CGAL and WITH_CGAL_TESTS
  - WITH_CGAL still implies WITH_VIEWER (for local full builds)
  - Remove duplicate find_package(Boost) inside the WITH_CGAL block

code/tests/CMakeLists.txt
  - cgal/ subdirectory added for WITH_CGAL OR WITH_CGAL_TESTS

.gitea/workflows/cpp-tests.yml
  - test-cgal job: -DWITH_CGAL=ON → -DWITH_CGAL_TESTS=ON

README.md
  - Build modes table: three rows (default / CGAL_TESTS / CGAL full)
  - Quick-start: separate headless and full-local sections
  - Prerequisite table updated

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 13:50:56 +02:00

37 lines
1.4 KiB
CMake

add_executable(conformallab_tests
# ── Fully ported (pure math, no HDS) ────────────────────────────────────
test_clausen.cpp
test_hyper_ideal_utility.cpp
test_matrix_utility.cpp
test_surface_curve_utility.cpp
test_discrete_elliptic_utility.cpp
test_p2_utility.cpp
test_hyper_ideal_visualization_utility.cpp
# ── Stubs: blocked until HDS port (Phase 4) ──────────────────────────────
# All tests call GTEST_SKIP() with a clear explanation.
test_hyper_ideal_functional.cpp
test_hyper_ideal_hyperelliptic_utility.cpp
test_spherical_functional.cpp
)
target_include_directories(conformallab_tests SYSTEM PRIVATE
${CMAKE_SOURCE_DIR}/deps/eigen-3.4.0
)
target_include_directories(conformallab_tests PRIVATE
${CMAKE_SOURCE_DIR}/include
)
target_link_libraries(conformallab_tests PRIVATE GTest::gtest_main)
include(GoogleTest)
gtest_discover_tests(conformallab_tests DISCOVERY_TIMEOUT 60)
# ── CGAL test suite ──────────────────────────────────────────────────────────
# Built with -DWITH_CGAL_TESTS=ON (headless CI, no viewer) or
# -DWITH_CGAL=ON (full build with viewer + CLI).
if(WITH_CGAL OR WITH_CGAL_TESTS)
add_subdirectory(cgal)
endif()