|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r53657 - trunk/libs/python/test
From: dave_at_[hidden]
Date: 2009-06-05 16:12:47
Author: dave
Date: 2009-06-05 16:12:47 EDT (Fri, 05 Jun 2009)
New Revision: 53657
URL: http://svn.boost.org/trac/boost/changeset/53657
Log:
Fix up a lot of missing dependency info. Closes #3136.
Text files modified:
trunk/libs/python/test/CMakeLists.txt | 23 ++++++++++++++++++++---
1 files changed, 20 insertions(+), 3 deletions(-)
Modified: trunk/libs/python/test/CMakeLists.txt
==============================================================================
--- trunk/libs/python/test/CMakeLists.txt (original)
+++ trunk/libs/python/test/CMakeLists.txt 2009-06-05 16:12:47 EDT (Fri, 05 Jun 2009)
@@ -13,26 +13,43 @@
cdr(BPL_TEST_DEFAULT_ARGS ${BPL_TEST_DEFAULT_ARGS})
get_filename_component(BPL_TEST_PYBASE ${BPL_TEST_PYSOURCE} NAME_WE)
+
+ # Process all the .cpp file and extension module names
foreach(SRC ${BPL_TEST_DEFAULT_ARGS})
get_filename_component(BPL_SRC_EXT ${SRC} EXT)
if (BPL_SRC_EXT STREQUAL ".cpp")
+
# Build a Python extension module from this source file
get_filename_component(BPL_SRC_NAME ${SRC} NAME_WE)
+
if(BPL_TEST_PYBASE STREQUAL "${BPL_SRC_NAME}")
- boost_python_extension(${BPL_SRC_NAME}_ext ${SRC})
+ set(BPL_EXTENSION_MODULE ${BPL_SRC_NAME}_ext)
else(BPL_TEST_PYBASE STREQUAL "${BPL_SRC_NAME}")
- boost_python_extension(${BPL_SRC_NAME} ${SRC})
+ set(BPL_EXTENSION_MODULE ${BPL_SRC_NAME})
endif(BPL_TEST_PYBASE STREQUAL "${BPL_SRC_NAME}")
+
+ boost_python_extension(${BPL_EXTENSION_MODULE} ${SRC})
+
+ else (BPL_SRC_EXT STREQUAL ".cpp")
+ set(BPL_EXTENSION_MODULE ${SRC})
+
endif (BPL_SRC_EXT STREQUAL ".cpp")
+
+ add_dependencies(${PROJECT_NAME}-test ${BPL_EXTENSION_MODULE})
endforeach(SRC ${BPL_TEST_DEFAULT_ARGS})
+
else (BPL_TEST_DEFAULT_ARGS)
+
set(BPL_TEST_PYSOURCE "${TESTNAME}.py")
# Build a Python extension module from this source file
boost_python_extension(${TESTNAME}_ext "${TESTNAME}.cpp")
- add_dependencies(${PROJECT_NAME}-test ${TESTNAME}_ext ${BPL_TEST_PYSOURCE})
+ add_dependencies(${PROJECT_NAME}-test ${TESTNAME}_ext)
+
endif(BPL_TEST_DEFAULT_ARGS)
+ add_dependencies(${PROJECT_NAME}-test ${BPL_TEST_PYSOURCE})
+
# We'll need the full patch to run the Python test
set(BPL_TEST_PYSOURCE ${CMAKE_CURRENT_SOURCE_DIR}/${BPL_TEST_PYSOURCE})
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk