CMakeLists.txt 722 字节
Newer Older
Z
zhangjinchao01 已提交
1 2
# The utilities for paddle

L
liaogang 已提交
3 4
configure_file(PythonUtil.cpp.in ${PROJ_ROOT}/paddle/utils/PythonUtil.cpp)

Z
zhangjinchao01 已提交
5 6
file(GLOB UTIL_HEADERS . *.h)
file(GLOB UTIL_SOURCES . *.cpp)
7 8 9
create_resources(enable_virtualenv.py enable_virtualenv.c)
set(UTIL_RES enable_virtualenv.c)

Y
Yu Yang 已提交
10 11 12 13 14
if(APPLE)
    file(GLOB UTIL_ARCH_SOURCES . arch/osx/*.cpp)
else()
    file(GLOB UTIL_ARCH_SOURCES . arch/linux/*.cpp)
endif()
Z
zhangjinchao01 已提交
15
add_library(paddle_utils STATIC
Y
Yu Yang 已提交
16
        ${UTIL_SOURCES}
17 18
        ${UTIL_ARCH_SOURCES}
        ${UTIL_RES})
Z
zhangjinchao01 已提交
19
add_style_check_target(paddle_utils ${UTIL_HEADERS})
Y
Yu Yang 已提交
20 21
add_style_check_target(paddle_utils ${UTIL_SOURCES}
    ${UTIL_ARCH_SOURCES})
Z
zhangjinchao01 已提交
22 23 24
add_dependencies(paddle_utils gen_proto_cpp)
if(WITH_TESTING)
    add_subdirectory(tests)
Y
Yu Yang 已提交
25
endif()