Add force calculation kernel and fix incorrect ctest configuration for Cuda tests

This commit is contained in:
Alex Selimov 2025-08-27 22:07:47 -04:00
parent cad74747bf
commit dc74e4e5c0
Signed by: aselimov
GPG key ID: 3DDB9C3E023F1F31
6 changed files with 348 additions and 6 deletions

View file

@ -2,8 +2,16 @@ include_directories(${gtest_SOURCE_DIR}/include ${gtest_SOURCE_DIR})
add_executable(${NAME}_cuda_tests
test_potential.cu
test_forces.cu
)
target_link_libraries(${NAME}_cuda_tests gtest gtest_main)
target_link_libraries(${NAME}_cuda_tests ${CMAKE_PROJECT_NAME}_cuda_lib)
add_test(NAME ${NAME}CudaTests COMMAND ${CMAKE_BINARY_DIR}/tests/unit_tests/${NAME}_tests)
add_test(NAME ${NAME}CudaTests COMMAND ${CMAKE_BINARY_DIR}/tests/cuda_unit_tests/${NAME}_cuda_tests)
# Add environment variables for NVIDIA GPU selection. Useful for facilitating testing on multi gpu
# systems
set_property(TEST ${NAME}CudaTests PROPERTY ENVIRONMENT
"__NV_PRIME_RENDER_OFFLOAD=1"
"__GLX_VENDOR_LIBRARY_NAME=nvidia"
)