qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r1574656 - /qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt
Date Wed, 05 Mar 2014 20:54:27 GMT
Author: aconway
Date: Wed Mar  5 20:54:27 2014
New Revision: 1574656

URL: http://svn.apache.org/r1574656
Log:
Revert "NO-JIRA: CMakelists.txt check that ../python exists before building it."

This reverts most of commit r1574138. The changes were intended to simplify
handling of setup.py by letting it detect when things were out of date,
but even when there are no changes setup.py does touch some files:

changing mode of /home/andrew/Work/qpid/bld-ninja/src/tests/python/commands/qpid-python-trunning
install_egg_info
removing /home/andrew/Work/qpid/bld-ninja/src/tests/python/qpid_python-0.27-py2.7.egg-info
writing /home/andrew/Work/qpid/bld-ninja/src/tests/python/qpid_python-0.27-py2.7.egg-info

This commit restores the previous logic that avoids running setup.py if not needed
but retains the if (EXISTS ${python_src}) check to avoid all this logic if
there is no python source directory available.

Modified:
    qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt

Modified: qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt?rev=1574656&r1=1574655&r2=1574656&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt Wed Mar  5 20:54:27 2014
@@ -311,14 +311,24 @@ endif (BUILD_SASL)
 set (python_src ${CMAKE_SOURCE_DIR}/../python)
 if (EXISTS ${python_src})
     set (python_bld ${CMAKE_CURRENT_BINARY_DIR}/python)
-    add_custom_target(
-	build_python ALL
-	COMMAND ${PYTHON_EXECUTABLE} setup.py
+    # 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
+	    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}
+    )
 endif (EXISTS ${python_src})
 
 if (BUILD_SASL)



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message