summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2014-01-23 23:34:14 +0000
committerAndrew Stitcher <astitcher@apache.org>2014-01-23 23:34:14 +0000
commit926150bd3fa44fe5c6e7eafb7dbbd23cb19b7475 (patch)
treea51ce0319e3f0b2d240c18b73a782264d95414f5 /qpid/cpp/src/tests
parent734f28dd78a81e668b0075bf94fe64c8d1d6e806 (diff)
downloadqpid-python-926150bd3fa44fe5c6e7eafb7dbbd23cb19b7475.tar.gz
NO-JIRA: Changes to python related build processes:
- Use an intermediate build area in the build area not in the source. -- With this change the source tree is now completely untouched during a build. - Fiddle with CMake so that the python install into the build area doesn't happen on every build. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1560851 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests')
-rw-r--r--qpid/cpp/src/tests/CMakeLists.txt20
1 files changed, 16 insertions, 4 deletions
diff --git a/qpid/cpp/src/tests/CMakeLists.txt b/qpid/cpp/src/tests/CMakeLists.txt
index 9cacd10976..74a3463920 100644
--- a/qpid/cpp/src/tests/CMakeLists.txt
+++ b/qpid/cpp/src/tests/CMakeLists.txt
@@ -304,12 +304,24 @@ if (BUILD_SASL)
remember_location(sasl_version)
endif (BUILD_SASL)
-# Always run the python install, setup.py is smart enough to do only what is needed.
set (python_bld ${CMAKE_CURRENT_BINARY_DIR}/python)
set (python_src ${CMAKE_SOURCE_DIR}/../python)
-add_custom_target(python_bld ALL
- COMMAND ${PYTHON_EXECUTABLE} setup.py install --prefix=${python_bld} --install-lib=${python_bld} --install-scripts=${python_bld}/commands
- WORKING_DIRECTORY ${python_src})
+
+# If we want this to automatically run when we change the python library we will need to
+# add some explicit dependencies on the source python files
+add_custom_command(
+ OUTPUT ${python_bld}
+ 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 (BUILD_SASL)
add_test (sasl_fed ${test_wrap} -- ${CMAKE_CURRENT_SOURCE_DIR}/sasl_fed${test_script_suffix})