# TRACCC library, part of the ACTS project (R&D line)
#
# (c) 2021-2025 CERN for the benefit of the ACTS project
#
# Mozilla Public License Version 2.0

# Declare the core library test(s).
traccc_add_test(core
   "test_algorithm.cpp"
   "test_axis.cpp"
   "test_copy.cpp"
   "test_grid2.cpp"
   "test_populator.cpp"
   "test_pvalue.cpp"
   "test_ranges.cpp"
   "test_serializer.cpp"
   "test_simulation.cpp"
   "test_subspace.cpp"
   "particle.cpp"
   LINK_LIBRARIES GTest::gtest_main vecmem::core traccc_tests_common
   traccc::core traccc::io traccc::performance traccc::simulation
)

if(TRACCC_USE_ROOT)
    find_package(ROOT COMPONENTS Core RIO Hist REQUIRED)
    target_link_libraries(traccc_test_core PRIVATE ROOT::Core)
    target_compile_definitions(traccc_test_core PRIVATE TRACCC_HAVE_ROOT)
endif()
