[CMake] cross compiling - platform files
Alexander Neundorf
a.neundorf-work at gmx.net
Mon Jul 26 16:35:13 EDT 2010
On Friday 02 July 2010, Kishore wrote:
> On Thursday 01 Jul 2010 8:13:56 pm Kishore wrote:
> > In the CMake wiki (http://www.cmake.org/Wiki/CMake_Cross_Compiling) it
> > says clearly that the platform module are included in the following
> > order;
> >
> > Platform/${CMAKE_SYSTEM_NAME}.cmake (mandatory)
> > Platform/${CMAKE_SYSTEM_NAME}-<compiler>.cmake (optional)
> > Platform/${CMAKE_SYSTEM_NAME}-<compiler>-${CMAKE_SYSTEM_PROCESSOR}.cmake
> > (optional)
> >
> > However, in my project it seems that They are included in the reverse
> > order to that. At least, Generic-gcc-${CMAKE_SYSTEM_PROCESSOR}.cmake is
> > included before Generic-gcc.cmake.
> >
> > Can someone kindly confirm. Is this a bug in cmake or an error in
> > documentation?
>
> Anyone? What was the original intension when cresting this feature?
Wiki page seems to be wrong.
The CMAKE_SYSTEM_PROCESSOR file is included first so that there
hardware-specific flags can be set, which can then be inserted into the
compile or link variables in the more generic
${CMAKE_SYSTEM_NAME}-<compiler>.cmake file.
This is usually necessary when working on embedded projects where different
compiler or linker flags are needed depending on the target hardware.
Alex
More information about the CMake
mailing list