fix: tests

This commit is contained in:
parker
2025-07-28 17:18:10 +01:00
parent 34da64bbb2
commit 93fe708646
5 changed files with 53 additions and 43 deletions

View File

@@ -81,36 +81,36 @@ target_include_directories(${AppExec} PUBLIC src)
add_subdirectory(src/OpDefs)
# tests
# Include(FetchContent)
Include(FetchContent)
# FetchContent_Declare(
# Catch2
# GIT_REPOSITORY https://github.com/catchorg/Catch2.git
# GIT_TAG v3.8.1 # or a later release
# )
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.8.1 # or a later release
)
# FetchContent_MakeAvailable(Catch2)
FetchContent_MakeAvailable(Catch2)
# add_executable(${TestExec}
# ${ENGINE_SOURCES}
# tests/main-tests.cpp
# tests/OperatorTests.cpp
# tests/NetworkTests.cpp
# )
# target_link_libraries(${TestExec} PRIVATE Catch2::Catch2WithMain Eigen3::Eigen Qt6::Core TBB::tbb Boost::filesystem Boost::system)
# target_compile_definitions(${TestExec} PRIVATE UNIT_TEST)
# target_include_directories(${TestExec} PUBLIC
# src
# ${BOOST_INCLUDE_DIRS}
# )
add_executable(${TestExec}
${ENGINE_SOURCES}
tests/main-tests.cpp
tests/OperatorTests.cpp
tests/NetworkTests.cpp
)
target_link_libraries(${TestExec} PRIVATE Catch2::Catch2WithMain Eigen3::Eigen Qt6::Core TBB::tbb Boost::filesystem Boost::system)
target_compile_definitions(${TestExec} PRIVATE UNIT_TEST)
target_include_directories(${TestExec} PUBLIC
src
${BOOST_INCLUDE_DIRS}
)
# # benchmarks
# add_executable(${BenchExec}
# ${ENGINE_SOURCES}
# benchmarks
add_executable(${BenchExec}
${ENGINE_SOURCES}
# tests/Benchmarks.cpp
# )
# target_link_libraries(${BenchExec} PRIVATE Catch2::Catch2WithMain Eigen3::Eigen Qt6::Core TBB::tbb Boost::filesystem Boost::system)
# target_compile_definitions(${BenchExec} PRIVATE UNIT_TEST)
# target_include_directories(${BenchExec} PUBLIC src)
tests/Benchmarks.cpp
)
target_link_libraries(${BenchExec} PRIVATE Catch2::Catch2WithMain Eigen3::Eigen Qt6::Core TBB::tbb Boost::filesystem Boost::system)
target_compile_definitions(${BenchExec} PRIVATE UNIT_TEST)
target_include_directories(${BenchExec} PUBLIC src)