CMakeLists.txt 965 字节
Newer Older
Z
zhangjinchao01 已提交
1 2 3 4 5
# unittest for common package

add_simple_unittest(test_ExecViaCpu)
add_simple_unittest(test_SIMDFunctions)
add_simple_unittest(test_matrix)
H
hedaoyuan 已提交
6
add_simple_unittest(test_TrainingAlgorithm)
Z
zhangjinchao01 已提交
7 8 9 10 11 12 13 14 15 16

# TODO(yuyang18): Refactor TestUtil.cpp. Remove this cross module reference.
add_unittest(test_matrixCompare
    test_matrixCompare.cpp
    ../../gserver/tests/TestUtil.cpp)

add_simple_unittest(test_sparseMatrixCompare)
add_simple_unittest(test_perturbation)
add_simple_unittest(test_CpuGpuVector)
add_simple_unittest(test_Allocator)
H
hedaoyuan 已提交
17
if(WITH_GPU)
H
hedaoyuan 已提交
18 19
	CUDA_ADD_EXECUTABLE(test_Tensor test_Tensor.cu)
	link_paddle_test(test_Tensor)
H
hedaoyuan 已提交
20
    if(COMPILER_SUPPORT_CXX11)
H
hedaoyuan 已提交
21 22
        CUDA_ADD_EXECUTABLE(test_lazyAssign test_lazyAssign.cu)
        link_paddle_test(test_lazyAssign)
H
hedaoyuan 已提交
23 24 25 26
    endif()
else()
    compile_cu_as_cpp(test_Tensor.cu)
    add_unittest(test_Tensor test_Tensor.cu)
H
hedaoyuan 已提交
27 28
    compile_cu_as_cpp(test_lazyAssign.cu)
    add_unittest(test_lazyAssign test_lazyAssign.cu)
H
hedaoyuan 已提交
29 30
endif(WITH_GPU)