CMakeLists.txt 1.1 KB
Newer Older
Z
zhangjinchao01 已提交
1 2 3 4
# unittest for common package

add_simple_unittest(test_ExecViaCpu)
add_simple_unittest(test_SIMDFunctions)
H
hedaoyuan 已提交
5
add_simple_unittest(test_TrainingAlgorithm)
Y
Yu Yang 已提交
6
add_simple_unittest(test_RowBuffer)
H
hedaoyuan 已提交
7 8 9
if(NOT MOBILE_INFERENCE)
    add_simple_unittest(test_SparseMatrix)
endif()
Z
zhangjinchao01 已提交
10 11 12

# TODO(yuyang18): Refactor TestUtil.cpp. Remove this cross module reference.
add_unittest(test_matrixCompare
13
    test_matrixCompare.cpp)
Z
zhangjinchao01 已提交
14 15 16 17 18

add_simple_unittest(test_sparseMatrixCompare)
add_simple_unittest(test_perturbation)
add_simple_unittest(test_CpuGpuVector)
add_simple_unittest(test_Allocator)
19

H
hedaoyuan 已提交
20
if(WITH_GPU)
H
hedaoyuan 已提交
21 22 23
    CUDA_ADD_EXECUTABLE(test_Tensor test_Tensor.cu)
    link_paddle_test(test_Tensor)
    CUDA_ADD_EXECUTABLE(test_lazyAssign test_lazyAssign.cu)
K
Kexin Zhao 已提交
24
    link_paddle_test(test_lazyAssign)
H
hedaoyuan 已提交
25 26 27
else()
    compile_cu_as_cpp(test_Tensor.cu)
    add_unittest(test_Tensor test_Tensor.cu)
H
hedaoyuan 已提交
28 29
    compile_cu_as_cpp(test_lazyAssign.cu)
    add_unittest(test_lazyAssign test_lazyAssign.cu)
H
hedaoyuan 已提交
30 31
endif(WITH_GPU)

32
add_simple_unittest(test_FPException)
33
add_simple_unittest(test_GpuProfiler)
34 35
add_simple_unittest(test_BaseMatrix)
add_simple_unittest(test_Matrix)