Hello,

I have an external build process that produces a linker script that I
must use in my CMake project.  I must leave the external build as-is.
I'm using gcc in Linux.

I must relink my application built with CMake if the linker script
changes.  I'm trying to do this in a simple macro and it's not
working.  I do not see a first class way to specify arbitrary link
dependencies, so I'm setting the dependency indirectly to the
application sources.

# setup link dependencies for _app_name
MACRO( DEPEND_ON_LD _app_name)
GET_TARGET_PROPERTY( _srcs ${_app_name} SOURCES )
SET_SOURCE_FILES_PROPERTIES( ${_srcs} PROPERTIES OBJECT_DEPENDS
/full/path/to/linker_script.ld )
ENDMACRO()

If I touch the linker script file, my app does not relink.

Any help is very much appreciated!  Perhaps there is a cleaner way to do this?

Thanks,
-steve
_______________________________________________
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