[cmake-developers] Idea for Multi-Toolchain Support

frodak17 frodak17 at gmail.com
Tue Dec 18 14:10:12 EST 2018


How does this work with multiple languages and the project() command and
enable_language() commands?

For instance you want to use the host c++ compiler and a toolchain
specified compiler for c and c++.
When project() enables the c++ compiler it runs through a bunch of scripts
to find and test the compiler also setting several CMAKE_<lang>_* variables
to use that compiler.  These variables also happen to be the default
compile options for the build types when using that compiler.

Then the same thing happens with the tool-chain specified compiler for
these languages how do you track that the variables are different for these
two toolchains?
Are these variables now project scoped and for any given project it is
limited to one toolchain per language per project?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake-developers/attachments/20181218/7fa67e25/attachment.html>


More information about the cmake-developers mailing list