[CMake] Cross compiling in Win32 environment doesn't work

Eric Noulard eric.noulard at gmail.com
Mon Sep 19 09:46:52 EDT 2011


2011/9/19 Martin Kupke <martin.kupke at novero.com>
>
> My problem (the error) already occurs in the toolchain file, this means before the CMakeLists.txt is read. So far it is total independent of the entries in the CMakeLists.txt!
>
> I have added the line:
> message ("Mein CMakeLists.txt File")
> in top of my CMakeLists.txt and would assume that there is an output on the console with the string, but it isn't.
>
> The output is stopped while parsing the toolchain file and determining the compiler.

That's what I was about to say.

Read http://www.vtk.org/Wiki/CMake_Cross_Compiling  carefully
you'll see that you may have to write a

Platform/${CMAKE_SYSTEM_NAME}-<compiler>.cmake file
in order to inform CMake about your particular compiler compilation FLAGS.

Doing it in CMakeLists.txt may already be too late.
Nevertheless it puzzles me that it works on Linux and not on Windows...

I'm no expert concerning Cross-compiling with CMake so I let others
take over this discussion.

--
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list