[CMake] Add linker command file to object files

Florian Reinhard florian.reinhard at googlemail.com
Wed Jul 20 08:19:41 EDT 2011


Hi Michael,

Thank you for that long and well explained resonse!

I just gave your EXTERNAL_OBJECT approach with a patched cmake version a try.

Unfortunately this is just almost a solution. That way the linker.cmd
appears in the list of files that are fed to the linker, but it
doesn't keep the same order as specified in ADD_EXECUTABLE. External
objects are being appended to the list of object files which doesn't
help in that place. I manually edited the resulting makefile and added
the .cmd file to the object file list in the right place and ran make.
That way the build was completed successfully.

So i guess the only way to have the .cmd file appear in the list of
objects in the same place where it is in the list of source files is
to fiddle with the CMAKE_<LANG>_IGNORE_EXTENSIONS.

Kind Regards,

Florian


More information about the CMake mailing list