[CMake] set CMAKE_TOOLCHAIN_FILE inside cmake file

Alexander Neundorf a.neundorf-work at gmx.net
Mon Apr 14 16:52:03 EDT 2008


On Friday 11 April 2008, Jun Sun wrote:
> I am using the 2.6 branch. Very nice to see crosscompile working well.
> Thanks.
>
> One question is that CMAKE_TOOLCHAIN_FILE seems only working when set
> at commandline, but not from inside CMakeList.txt, true?

Yes. 
If done from within a CMakeLists.txt this would be too late, since a few tests 
have already been executed then, and if this hasn't been set before they have 
been executed for the native compiler.

Alex


More information about the CMake mailing list