Skip to content

Commit

Permalink
Add CMake configuration to tests folder
Browse files Browse the repository at this point in the history
  • Loading branch information
abelsiqueira committed Mar 4, 2022
1 parent f98f6ed commit e201ce9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ add_library(cudawrappers SHARED ${SOURCE_FILES})
include(cmake/linter-tools.cmake)

# Tests
add_subdirectory(tests/vector_add)
add_subdirectory(tests)
7 changes: 7 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# vector_add
add_subdirectory(vector_add)

add_custom_target(test
COMMAND vector_add/vector_add
DEPENDS vector_add
)
3 changes: 2 additions & 1 deletion tests/vector_add/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
file(COPY vector_add_kernel.cu DESTINATION ../..)
# Copies the kernel function to the tests folder
file(COPY vector_add_kernel.cu DESTINATION ..)
add_executable(vector_add vector_add.cpp)
target_link_libraries(vector_add PRIVATE cudawrappers CUDA::cuda_driver CUDA::nvrtc)

0 comments on commit e201ce9

Please sign in to comment.