summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2014-01-06 19:33:10 +0000
committerAlan Conway <aconway@apache.org>2014-01-06 19:33:10 +0000
commit84bf7e898d113890c66f7c4ee3e7fd8908cb1db9 (patch)
tree5713ddc7e2a7e2d6fb00944dc2c1834cd56f0529 /cpp
parentf536b70d7f37607f0cbd1570512f2755a3fd9cf8 (diff)
downloadqpid-python-84bf7e898d113890c66f7c4ee3e7fd8908cb1db9.tar.gz
NO-JIRA: Install python code as part of cmake make phase
Previosly the qpid/python code was being installed only during cmake configuration phase and was not updated if the python code changed later. Added a custom target to run setup.py whenever make is run. setup.py is smart enough not to do un-necessary work if the python files have not changed. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1555989 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/tests/CMakeLists.txt14
1 files changed, 5 insertions, 9 deletions
diff --git a/cpp/src/tests/CMakeLists.txt b/cpp/src/tests/CMakeLists.txt
index 125982a26e..252babff91 100644
--- a/cpp/src/tests/CMakeLists.txt
+++ b/cpp/src/tests/CMakeLists.txt
@@ -300,16 +300,12 @@ if (BUILD_SASL)
remember_location(sasl_version)
endif (BUILD_SASL)
-# This should ideally be done as part of the test run, but I don't know a way
-# to get these arguments and the working directory set like Makefile.am does,
-# and have that run during the test pass.
-#
-# Need to check to see that the python tools are included as part of the source
-# tree first and don't install them or run dependent tests if they are not there
-#
+# Always run the python install, setup.py is smart enough to do only what is needed.
set (python_bld ${CMAKE_CURRENT_BINARY_DIR}/python)
-execute_process(COMMAND ${PYTHON_EXECUTABLE} setup.py install --prefix=${pythoon_bld} --install-lib=${python_bld} --install-scripts=${python_bld}/commands
- WORKING_DIRECTORY ${CMAKE_SOURCE_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 (BUILD_SASL)
add_test (sasl_fed ${test_wrap} -- ${CMAKE_CURRENT_SOURCE_DIR}/sasl_fed${test_script_suffix})