On Saturday, June 04, 2011 05:09:27 PM Dan Furtney wrote:
> Can the pre-link commands be added to the vxworks.cmake with a
> ADD_CUSTOM_COMMAND call?  I initially tried doing this in the
> CMakeLists.txt file via a ADD_CUSTOM_COMMAND(TARGET...) call and a special
> LINK command I can't recall. 

So you need to do two steps when linking the executable ?
I think (this is not 100% sure) this is not supported.
In the VxWorks.cmake you don't know the names of the targets, so you can't add 
custom commands there.

What you can do is to write a macro like
macro(vxworks_add_executable name)
  add_executable(${name} ...)
  add_custom_command(TARGET ${name} PRE_LINK  COMMAND ... )
endmacro()

Then you would have to use this macro in your actual CMakeLists.txt instead of 
add_executable() directly.

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