diff --git a/cmake/generic.cmake b/cmake/generic.cmake index ee13dcee2d1d175e577e89528ee3571c840185cd..052530608e6dd7bf86ae082500ad8c838dddaaea 100644 --- a/cmake/generic.cmake +++ b/cmake/generic.cmake @@ -144,10 +144,8 @@ function(nv_test TARGET_NAME) set(multiValueArgs SRCS DEPS) cmake_parse_arguments(nv_test "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) cuda_add_executable(${TARGET_NAME} ${nv_test_SRCS}) - if(nv_test_DEPS) - target_link_libraries(${TARGET_NAME} ${nv_test_DEPS} gtest gtest_main) - add_dependencies(${TARGET_NAME} ${nv_test_DEPS} gtest gtest_main) - endif() + target_link_libraries(${TARGET_NAME} ${nv_test_DEPS} gtest gtest_main) + add_dependencies(${TARGET_NAME} ${nv_test_DEPS} gtest gtest_main) add_test(${TARGET_NAME} ${TARGET_NAME}) endif() endfunction(nv_test)