Hi, I have a custom target that runs some unit tests during compile time. This target is executed on each build, which is of course suboptimal, because if the unit test suite and all of the dependent libraries are the same, it's no use to run it. The tricky part is that the unit test suite links dynamically against some other libraries. Originally I used ADD_CUSTOM_COMMAND, but the problem is that the unit test target does not get build if I only change a source file of one of the libraries. Right now, I have a custom target which is called every time, and I could hack that to check if the source dependency has changed (i.e. if the timestamp is more recent than the unit test suite), but I wonder if there is a nicer way for this. Basically something as ADD_CUSTOM_COMMAND(TARGET ... DEPENDS ...)
Cheers, -j _______________________________________________ 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
