I added the -E, no difference.

 

Shouldn't an error have been printed the first time round when I didn't have
the -E.  There was no error.

I traced it and the ADD_CUSTOM_COMMAND was in the trace.

Is this an indication that line is not executed at all?

 

From: David Cole [mailto:david.c...@kitware.com] 
Sent: 01 July 2010 19:58
To: Hicham Mouline
Cc: cmake@cmake.org
Subject: Re: [CMake] generating source files with ADD_CUSTOM_COMMAND

 

I think you mean:

${CMAKE_COMMAND} -E copy src dst

 

You forgot the -E.

 

 

On Thu, Jul 1, 2010 at 2:38 PM, Hicham Mouline <hic...@mouline.org> wrote:

Hello

I'm trying to generate source files .cxx and include them in ADD_LIBRARY to
build a static library, according to
http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_generate_a_source_file_during_
the_build.3F

#
# Copy template source files to *.cxx and place them in the build dir
#
ADD_CUSTOM_COMMAND(
 OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/name.cxx
${CMAKE_CURRENT_BINARY_DIR}/widget.cxx
 COMMAND ${CMAKE_COMMAND} copy
${CMAKE_SOURCE_DIR}/systems/template_name.cpp
${CMAKE_CURRENT_BINARY_DIR}/name.cxx
 COMMAND ${CMAKE_COMMAND} copy
${CMAKE_SOURCE_DIR}/systems/template_widget.cpp
${CMAKE_CURRENT_BINARY_DIR}/widget.cxx
 DEPENDS ${CMAKE_SOURCE_DIR}/template_name.cpp
${CMAKE_SOURCE_DIR}/systems/template_widget.cpp
)




 

_______________________________________________
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

Reply via email to