diff options
Diffstat (limited to 'src/tests/CMakeLists.txt')
-rw-r--r-- | src/tests/CMakeLists.txt | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index e31ed1d4..ccf8cc72 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -1,25 +1,26 @@ # Unit tests add_subdirectory(units) +if(NOT MSVC) + # Testing apps + set(APP_TESTS + logger + dropout + sqlite + prod + cli + pooling + ) -# Testing apps -set(APP_TESTS - logger - dropout - sqlite - prod - cli - pooling -) + foreach(test ${APP_TESTS}) + add_executable("test_${test}" "${test}.cpp") -foreach(test ${APP_TESTS}) - add_executable("test_${test}" "${test}.cpp") + if(CUDA_FOUND) + target_link_libraries("test_${test}" ${EXT_LIBS} marian ${EXT_LIBS} marian_cuda ${EXT_LIBS}) + else(CUDA_FOUND) + target_link_libraries("test_${test}" marian ${EXT_LIBS}) + endif(CUDA_FOUND) - if(CUDA_FOUND) - target_link_libraries("test_${test}" ${EXT_LIBS} marian ${EXT_LIBS} marian_cuda ${EXT_LIBS}) - else(CUDA_FOUND) - target_link_libraries("test_${test}" marian ${EXT_LIBS}) - endif(CUDA_FOUND) - - set_target_properties("test_${test}" PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}") -endforeach(test) + set_target_properties("test_${test}" PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}") + endforeach(test) +endif(NOT MSVC)
\ No newline at end of file |