On Fri, May 07, 2010 at 04:41:23PM +0100, Magnus Therning wrote: > > add_custom_command (TARGET ${PROJECT_NAME} > > POST_BUILD > > # Call the runner script directly. By doing it this way, all the > > # unit tests in the executable run at once. If we call CTest > > # here (like we do for the _runtest target), the script (and > > # thus the python interpreter) is invoked once for each test in > > # the executable, which is slower than calling the script once. > > COMMAND ${PYTHON_EXECUTABLE} ${${PROJECT_NAME}_TESTRUNNER} > > ${CMAKE_CFG_INTDIR} --gtest_print_time > > ) > > One thing though, it seems the command is run *always* irrespective of > whether the target is built or not. That doesn't seem to square up > with the text in the man page:
Works For Me. I only see unit test runs if the library in question is recompiled or relinked. What version of CMake are you using? tyler _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake