[CMake] VxWorks Cross Compilation Strategy
Alexander Neundorf
a.neundorf-work at gmx.net
Sat Jun 4 12:56:26 EDT 2011
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
More information about the CMake
mailing list