[CMake] CMAKE_C_COMPILER ignored

Volker volker at openbios.org
Tue Jan 1 11:08:24 EST 2008


Am Dienstag, 1. Januar 2008 15:39:31 schrieb Amitha Perera:
> Volker wrote:
> > But i don't see the use of the CMAKE_C_COMPILER variable. Setting this
> > seems to have no effect at all. I removed everything related to cmake
> > (except said CMakeList.txt) from my build-tree and my source-tree. *Then*
> > i ran a clean cmake.
>
> (There shouldn't be any CMake generated files in your source tree, if
> your build tree != your source tree.)
There are none now :-) Followed the advice in the docs and switched to out of 
tree build.

>
> > So i figure the compiler to use can only be set via enviroment vars or by
> > editing CMakeCache.txt after running cmake. (??)
>
> In general, yes.
>
> > But how does this SET( CMAKE_C_COMPILER ....) work? I saw it in several
> > examples on google searching for CMAKE_C_COMPILER.
>
> Probably through the -C command line option to CMake. (cmake --help.)
> You can use that to set up the initial cache values through CMake script.

I see. Anyway, cross compiling seems to work fine now for me.

Thanks for the help
....Volker

>
> Amitha.




More information about the CMake mailing list