cuElim/test/CMakeLists.txt

30 lines
818 B
CMake
Raw Normal View History

2024-09-05 16:56:58 +08:00
find_package(GTest REQUIRED) # 查找GTest库
include_directories(${PROJECT_SOURCE_DIR}/test) # 添加测试头文件目录
set(TEST_SRC_FILES
2024-09-14 15:57:00 +08:00
"test_gf256_header.cu"
"test_gf256_matrix.cu"
"test_gf256_elim.cu"
"test_gfp_mul.cu"
2024-10-22 10:56:24 +08:00
"test_gfp_elim.cu"
2024-09-05 16:56:58 +08:00
)
foreach(SRC ${TEST_SRC_FILES})
get_filename_component(SRC_NAME ${SRC} NAME_WE)
add_executable(${SRC_NAME} ${SRC})
target_link_libraries(${SRC_NAME} GTest::GTest GTest::Main)
gtest_discover_tests(${SRC_NAME})
endforeach()
2024-10-22 10:56:24 +08:00
set(TEST_M4RIE_SRC_FILES
"test_interface.cu"
)
2024-09-05 16:56:58 +08:00
2024-10-22 10:56:24 +08:00
foreach(SRC ${TEST_M4RIE_SRC_FILES})
get_filename_component(SRC_NAME ${SRC} NAME_WE)
add_executable(${SRC_NAME} ${SRC})
target_link_libraries(${SRC_NAME} GTest::GTest GTest::Main m4ri m4rie)
gtest_discover_tests(${SRC_NAME})
endforeach()