[cmake-developers] Using multiple toolchains

Amine Khaldi amine.khaldi at reactos.org
Thu Jul 4 10:54:57 EDT 2013


I just want to express that we (ReactOS) are also a victim of this
separation between native and cross compiling CMake invocations, because
we depend on some host tools that we must compile natively, in order to
use them later on when compiling ReactOS itself. In Windows for example,
the native and the cross compiling toolchains can be (and they often
are) one and the same, so having this separation is.. interesting.

We also use Visual Studio but the CMake generated solution is far from a
normal/expected VS solution, because it doesn't make use of VS' support
of multiple toolchains in one solution, and the support of host/target
toolchains. What you get is two solutions where you must open the host
tools (native) one first, compile it, then close it and open the target
one (cross compiling) in order to really start compiling anything (the
native solution exports the not tools).

Being the one who converted ReactOS from rbuild (our own build system)
to CMake, when I discovered this problem, I was hoping that it's simply
due to my lack of understanding and familiarity with CMake (I knew
*nothing* about CMake when I started the experiment in a ReactOS
branch), but until today, we're still having two build folders: one for
host tools and one for the actual ReactOS. Inspecting the
ExternalProject approach not only led to even more complex build scripts
and no success in implementing one CMake invocation to get things done
(we tried), but also led to going even farther from the expected VS
behavior when it comes to multiple toolchains.

As you can see, we really feel the pain and the need for a proper, CMake
based, VS aware approach to multiple toolchains, and I wanted you to
know that we really welcome such a long overdue effort !

Cheers,
Amine.



More information about the cmake-developers mailing list