cuElim/test/CMakeLists.txt

29 lines
819 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-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()
# set(TEST_M4RIE_SRC_FILES
# "test_m4rie_interface.cu"
# )
# 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()