diff options
| author | Alan Conway <aconway@apache.org> | 2014-03-04 17:16:10 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2014-03-04 17:16:10 +0000 |
| commit | 83cb92ee0a6f4763da2670538a2429e271dde129 (patch) | |
| tree | 3671e63315d9fe173a1fde30c91761f79b7145e1 /qpid/cpp/src | |
| parent | 005a7541e991aa5fde879ffab58292d33f36011f (diff) | |
| download | qpid-python-83cb92ee0a6f4763da2670538a2429e271dde129.tar.gz | |
NO-JIRA: CMakelists.txt check that ../python exists before building it.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1574138 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/tests/CMakeLists.txt | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/qpid/cpp/src/tests/CMakeLists.txt b/qpid/cpp/src/tests/CMakeLists.txt index 4c0dcba500..b2ee10df15 100644 --- a/qpid/cpp/src/tests/CMakeLists.txt +++ b/qpid/cpp/src/tests/CMakeLists.txt @@ -308,27 +308,18 @@ if (BUILD_SASL) remember_location(sasl_version) endif (BUILD_SASL) -set (python_bld ${CMAKE_CURRENT_BINARY_DIR}/python) set (python_src ${CMAKE_SOURCE_DIR}/../python) - -# This will not pick up added or deleted python files -# In that case you need to rerun CMake -file(GLOB_RECURSE python_files ${python_src}/*.py) - -add_custom_command( - OUTPUT ${python_bld} - DEPENDS ${python_files} - COMMAND ${PYTHON_EXECUTABLE} - setup.py - build --build-base=${python_bld}/build - install --prefix=${python_bld} --install-lib=${python_bld} --install-scripts=${python_bld}/commands - WORKING_DIRECTORY ${python_src} -) - -add_custom_target( - python_bld ALL - DEPENDS ${python_bld} -) +if (EXISTS ${python_src}) + set (python_bld ${CMAKE_CURRENT_BINARY_DIR}/python) + add_custom_target( + build_python ALL + COMMAND ${PYTHON_EXECUTABLE} setup.py + build --build-base=${python_bld}/build + install --prefix=${python_bld} --install-lib=${python_bld} + --install-scripts=${python_bld}/commands + WORKING_DIRECTORY ${python_src} + ) +endif (EXISTS ${python_src}) if (BUILD_SASL) add_test (sasl_fed ${test_wrap} -- ${CMAKE_CURRENT_SOURCE_DIR}/sasl_fed${test_script_suffix}) |
