On Tue, Aug 18, 2009 at 12:47:24PM +0200, Arnaud Devalkeneer wrote:
> I have a strange behaviour with add_custom_comand with its output form.
> This command is called two or three times, even the file dependency has not
> been changed and the output exists.
> 
> I wrote :
> 
> ADD_CUSTOM_COMMAND(
>     OUTPUT ${${PROJECT_NAME}_WOK_GENERATED_INCLUDE}
>     COMMAND woktcl ARGS ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.tcl
>     DEPENDS ${${PROJECT_NAME}_CDLS}
>     COMMENT "Generating ${PROJECT_NAME} include files from CDLs"
>   )
> 
> ADD_LIBRARY(${PROJECT_NAME} SHARED
>             ${${PROJECT_NAME}_SRCS}
>             ${${PROJECT_NAME}_WOK_GENERATED_INCLUDE}

This looks correct to me. Are you sure you don't have any typos (_CDLS
is actually _CDL or something)?

If this rule is being re-run two or three times per make, you must have
something else going on. Do you have other add_* commands that use
_WOK_GENERATED_INCLUDE? Do any of your CMake commands touch your .cdls?

tyler
_______________________________________________
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