diff --git a/paddle/CMakeLists.txt b/paddle/CMakeLists.txt index 80f4c6bb542d72327a6209c06e341fb4985ef2f4..937b58130d502df51192654e4fa725b5640580c4 100644 --- a/paddle/CMakeLists.txt +++ b/paddle/CMakeLists.txt @@ -58,8 +58,8 @@ if(${len} GREATER_EQUAL 1) get_property(test_arg GLOBAL PROPERTY "${test_name}_ARGS") # message("add test ${test_name}") add_executable(${test_name} ${test_src}) - target_link_libraries(${test_name} $) target_link_libraries(${test_name} paddle_gtest_main_new) + target_link_libraries(${test_name} $) add_dependencies(${test_name} ${paddle_lib} paddle_gtest_main_new) if(WITH_GPU) target_link_libraries(${test_name} ${CUDA_CUDART_LIBRARY}