Shouldn&#39;t that be this?<br><br>add_custom_command(OUTPUT test_diagnostics_get_mean.icc<br>
    COMMAND python test_diagnostics_crosscheck.py<br>
    DEPENDS test_diagnostics_crosscheck.py)<br>add_executable(test_diagnostics test_diagnostics.cc test_diagnostics_get_mean.icc)<br><br>FYI, add_dependencies is only used to establish target-to-target dependencies (ordering), not file level dependencies...<br>
<a href="http://cmake.org/cmake/help/cmake-2-8-docs.html#command:add_dependencies">http://cmake.org/cmake/help/cmake-2-8-docs.html#command:add_dependencies</a><br><br><br>HTH,<br>David<br><br><br><div class="gmail_quote">
On Thu, Aug 5, 2010 at 11:30 AM, James Amundson <span dir="ltr">&lt;<a href="mailto:amundson@fnal.gov">amundson@fnal.gov</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
 I cannot get the following simple build process to work. I must be missing something.<br>
<br>
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<br>
    python test_diagnostics_crosscheck.py<br>
<br>
I thought the following would work:<br>
<br>
add_custom_command(OUTPUT test_diagnostics_get_mean.icc<br>
    COMMAND python test_diagnostics_crosscheck.py<br>
    DEPENDS test_diagnostics_crosscheck.py)<br>
add_executable(test_diagnostics test_diagnostics.cc)<br>
add_dependencies(test_diagnostics test_diagnostics_get_mean.icc)<br>
<br>
However<br>
<br>
make test_diagnostics<br>
<br>
fails because test_diagnostics_get_mean.icc is not found. I have to invoke<br>
<br>
make test_diagnostics_get_mean.icc<br>
<br>
manually in order to get it to work. What am I missing?<br>
<br>
Thanks,<br>
Jim Amundson<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br>