[CMake] Toolchains and CMAKE_FORCE_C_COMPILER in 3.5
Brad King
brad.king at kitware.com
Wed Feb 10 09:12:17 EST 2016
On 02/10/2016 03:49 AM, Vania Joloboff wrote:
> We have not yet moved to 3.5 but seeing this discussion, I am wondering
> what we will have to do. In our project, we have several C and C++ cross
> compilers and we want to compare them on selected benchmarks. We also
> want to compare different compile options and different linking options.
> We know for sure these cross compilers are working properly
> and our technique today is roughly
>
> CMakeForceCompiler(A)
> compile benchmarks with A (and various options)
> CMakeForceCCompiler(B)
> compile benchmarks with B
> CMakeForceCompiler(C)
> compile benchmarks with C
>
> Next, we run all the benchmarks and compare the results.
>
> How am I supposed to do that if CMakeForceCompiler() is deprecated ?
CMakeForceCompiler was meant for use in toolchain files. We do
not support switching compilers within a single CMakeLists.txt file
nor multiple toolchains in a single CMake run.
Can you post a more complete example of what you're trying to do?
It sounds like your sequence should be scripted externally and run
CMake multiple times with separate build trees.
-Brad
More information about the CMake
mailing list