CMakeLists.txt 957 字节
Newer Older
H
hedaoyuan 已提交
1 2
file(GLOB h_files . *Op.h)
file(GLOB cpp_files . *Op.cpp)
3 4 5

list(APPEND h_files Function.h)
list(APPEND cpp_files Function.cpp)
6
list(APPEND cpp_files BufferArg.cpp)
7 8

if(WITH_GPU)
H
hedaoyuan 已提交
9
    file(GLOB cu_files . *OpGpu.cu)
10
    cuda_compile(cu_objs ${cu_files})
H
hedaoyuan 已提交
11 12
endif()

13 14 15
add_library(paddle_function STATIC ${cpp_files} ${cu_objs})

if(WITH_GPU)
H
hedaoyuan 已提交
16
if(WITH_TESTING)
17
    # TODO:
H
hedaoyuan 已提交
18
    # file(GLOB test_files . *OpTest.cpp)
19
    # add_executable(${test_bin} EXCLUDE_FROM_ALL ${test_files})
20 21 22 23 24 25 26
    # add_simple_unittest(CrossMapNormalOpTest)
    add_simple_unittest(TensorShapeTest)
    add_simple_unittest(TensorTypeTest)
    add_simple_unittest(BufferArgTest)
    # add_unittest(ContextProjectionOpTest
    #    ContextProjectionOpTest.cpp
    #    ../gserver/tests/TestUtil.cpp)
27
endif()
H
hedaoyuan 已提交
28
endif()
29 30 31 32 33 34

add_style_check_target(paddle_function ${h_files})
add_style_check_target(paddle_function ${cpp_files})
if(WITH_GPU)
    add_style_check_target(paddle_function ${cu_files})
endif()