Shouldn't that be this? add_custom_command(OUTPUT test_diagnostics_get_mean.icc COMMAND python test_diagnostics_crosscheck.py DEPENDS test_diagnostics_crosscheck.py) add_executable(test_diagnostics test_diagnostics.cc test_diagnostics_get_mean.icc)
FYI, add_dependencies is only used to establish target-to-target dependencies (ordering), not file level dependencies... http://cmake.org/cmake/help/cmake-2-8-docs.html#command:add_dependencies HTH, David On Thu, Aug 5, 2010 at 11:30 AM, James Amundson <amund...@fnal.gov> wrote: > I cannot get the following simple build process to work. I must be missing > something. > > I build a (test) executable test_diagnostics, which depends on a source > file test_diagnostics.cc and a generated file test_diagnostics_get_mean.icc. > I generate the latter with > python test_diagnostics_crosscheck.py > > I thought the following would work: > > add_custom_command(OUTPUT test_diagnostics_get_mean.icc > COMMAND python test_diagnostics_crosscheck.py > DEPENDS test_diagnostics_crosscheck.py) > add_executable(test_diagnostics test_diagnostics.cc) > add_dependencies(test_diagnostics test_diagnostics_get_mean.icc) > > However > > make test_diagnostics > > fails because test_diagnostics_get_mean.icc is not found. I have to invoke > > make test_diagnostics_get_mean.icc > > manually in order to get it to work. What am I missing? > > Thanks, > Jim Amundson > _______________________________________________ > 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 >
_______________________________________________ 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