From a91f7847db16da39183cd6013231b122341d7149 Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Fri, 26 May 2017 14:43:22 +0800 Subject: [PATCH] Add with_testing guard for python/CMakeLists.txt --- python/CMakeLists.txt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 4f52f0f6cfd..3640dd3a75e 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -24,15 +24,16 @@ add_custom_target(paddle_python ALL DEPENDS ${OUTPUT_DIR}/.timestamp) set(PADDLE_PYTHON_PACKAGE_DIR ${CMAKE_CURRENT_BINARY_DIR}/dist/) -add_subdirectory(paddle/trainer_config_helpers/tests) -if (WITH_SWIG_PY) - # enable v2 API unittest only when paddle swig api is compiled - add_subdirectory(paddle/v2/tests) - add_subdirectory(paddle/v2/reader/tests) - add_subdirectory(paddle/v2/plot/tests) +if (WITH_TESTING) + add_subdirectory(paddle/trainer_config_helpers/tests) + if (WITH_SWIG_PY) + # enable v2 API unittest only when paddle swig api is compiled + add_subdirectory(paddle/v2/tests) + add_subdirectory(paddle/v2/reader/tests) + add_subdirectory(paddle/v2/plot/tests) + endif() endif() - install(DIRECTORY ${PADDLE_PYTHON_PACKAGE_DIR} DESTINATION opt/paddle/share/wheels ) -- GitLab