[CMake] multiple languages with single target

Chris Roberts cpr420 at gmail.com
Wed Sep 30 22:35:03 EDT 2009


Hello,

I am trying to implement support for a new language compiler but I'm
having difficulty with link phase.
The problem is that I need to split the link step into two different
commands and filter the objects that are sent to each linker.


Currently cmake is generating a command like:

c++ -o MyTarget object1.o object2.o object3.mylang

or if I change the LINK_PREFERENCE:

myld -o MyTarget object1.o object2.o object3.mylang



I would like to be able to have it generate something like:

c++ -o MyTarget object1.o object2.o && myld -o MyTarget object3.mylang


Is something like this possible?

Thanks
--Chris


More information about the CMake mailing list