diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-03-24 12:27:33 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-03-24 12:27:33 -0400 |
commit | ad07c35f12ca10bd3dfea50aaf8a9db8dcc9f630 (patch) | |
tree | 4b31aa43dcb942611fef8699bc96d166cf63b68e /tests/CMakeLists.txt | |
parent | ccaeb7092b5ad40b1b3833c987ba3ec4d47f0bb8 (diff) | |
download | spmc-ad07c35f12ca10bd3dfea50aaf8a9db8dcc9f630.tar.gz |
Initial commit of tests
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r-- | tests/CMakeLists.txt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 0000000..0eb8e34 --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1,18 @@ +include_directories( + ${CMAKE_SOURCE_DIR}/include + ${CMAKE_BINARY_DIR}/include +) +set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/tests) +set(CTEST_BINARY_DIRECTORY ${PROJECT_BINARY_DIR}/tests) + +file(GLOB files "test_*.c") + +foreach(file ${files}) + string(REGEX REPLACE "(^.*/|\\.[^.]*$)" "" file_without_ext ${file}) + add_executable(${file_without_ext} ${file}) + target_link_libraries(${file_without_ext} libspm ${PROJECT_LIBS}) + add_test(${file_without_ext} ${file_without_ext}) + set_tests_properties(${file_without_ext} + PROPERTIES + TIMEOUT 120) +endforeach() |