Nevermind, I caused a strange error whereby there was a file called dolfin/dolfin/la/.#Matrix.h which stopped CMake working properly.
Myles On 18 December 2013 15:07, Myles English <[email protected]> wrote: > Hello, > > If I build with cmake.local, then change the file > test/unit/la/python/Matrix.py in the source directory, then do > 'make' again in the build directory, I would have expected the > changes to be copied to the build directory, but they are not. > > If I do 'make run_quicktest' the changes are copied. > > I think this is because the initial copy was done using the > script copy_data_test_demo called from the top level > CMakeLists.txt and so CMake cannot keep track of the files involved. > > I believe this could be changed by adding an add_dependencies() > line, for example: > > if (DOLFIN_ENABLE_TESTING) > > # Add target "run_memorytests" [sic] for running memory tests > add_custom_target(copy_data_test_demo > COMMAND ${PYTHON_EXECUTABLE} > ${DOLFIN_SOURCE_DIR}/cmake/scripts/copy-test-demo-data > ${CMAKE_CURRENT_BINARY_DIR} > WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) > > add_dependencies(dolfin copy_data_test_demo) <--- THIS LINE ADDED > > [snip] > > # Add target "run_quicktest" for running only Python unit tests > add_custom_target(run_quicktest > COMMAND ${PYTHON_EXECUTABLE} test.py --only-python > DEPENDS copy_data_test_demo > WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test/unit") > > endif() > > However, I notice that there are no other occurences of > add_dependencies() so I am wondering: > > 1) if the current behaviour is intentional, and also > > 2) if the change could have unintended consequences, and > > 3) what about all the other places where files are copied to the > build tree with a COMMAND? > > Thanks, > Myles _______________________________________________ fenics mailing list [email protected] http://fenicsproject.org/mailman/listinfo/fenics
