CMakeLists.txt 524 字节
Newer Older
J
JiabinYang 已提交
1 2 3
if(NOT APPLE)
  set(PYTHON_TESTS_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH "python tests directory")
else()
J
JiabinYang 已提交
4
  set(PYTHON_TESTS_DIR ${PADDLE_BINARY_DIR}/python/paddle/fluid/tests CACHE INTERNAL "python tests directory")
J
JiabinYang 已提交
5
endif(NOT APPLE)
J
JiabinYang 已提交
6

7 8
file(GLOB TEST_OPS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "test_*.py")
string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}")
9

10
foreach(src ${TEST_OPS})
11
  py_test(${src} SRCS ${src}.py)
12
endforeach()
13

14
add_subdirectory(unittests)
15
add_subdirectory(book)
16
add_subdirectory(book_memory_optimization)