<div>I think you mean:</div><div>${CMAKE_COMMAND} -E copy src dst</div><div><br></div><div>You forgot the -E.</div><div><br></div><div><br><div class="gmail_quote">On Thu, Jul 1, 2010 at 2:38 PM, Hicham Mouline <span dir="ltr">&lt;<a href="mailto:hicham@mouline.org">hicham@mouline.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello<br>
<br>
I&#39;m trying to generate source files .cxx and include them in ADD_LIBRARY to<br>
build a static library, according to<br>
<a href="http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_generate_a_source_file_during_" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_generate_a_source_file_during_</a><br>
the_build.3F<br>
<br>
#<br>
# Copy template source files to *.cxx and place them in the build dir<br>
#<br>
ADD_CUSTOM_COMMAND(<br>
  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/name.cxx<br>
${CMAKE_CURRENT_BINARY_DIR}/widget.cxx<br>
  COMMAND ${CMAKE_COMMAND} copy<br>
${CMAKE_SOURCE_DIR}/systems/template_name.cpp<br>
${CMAKE_CURRENT_BINARY_DIR}/name.cxx<br>
  COMMAND ${CMAKE_COMMAND} copy<br>
${CMAKE_SOURCE_DIR}/systems/template_widget.cpp<br>
${CMAKE_CURRENT_BINARY_DIR}/widget.cxx<br>
  DEPENDS ${CMAKE_SOURCE_DIR}/template_name.cpp<br>
${CMAKE_SOURCE_DIR}/systems/template_widget.cpp<br>
)<br>
<br>
ADD_LIBRARY(mylib STATIC<br>
 main.cpp parameters.hpp<br>
 ${CMAKE_CURRENT_BINARY_DIR}/name.cxx<br>
 ${CMAKE_CURRENT_BINARY_DIR}/widget.cxx<br>
)<br>
<br>
<br>
The vs2008 solution is generated with the Solution explorer showing the .cxx<br>
files, but they are actually nowhere to be found.<br>
<br>
Regards,<br>
<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></div>