[CMake] CMAKE_C_COMPILER ignored

Volker volker at openbios.org
Tue Jan 1 07:16:17 EST 2008


Hi and a happy new year to everyone.

I'm new to cmake and using it on a cross compile project (i386 linux -> arm 
linux)

Somehow CMAKE_C_COMPILER in my CMakeList.txt is ignored.
This is my CMakeList.txt file:

PROJECT(myproject)
ADD_EXECUTABLE(myproject some files ...)
SET( CMAKE_C_COMPILER arm-linux-gcc )
SET( CMAKE_CXX_COMPILER arm-linux-g++ )

cmake always detects the host compiler instead of the specified one:
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
[...]

The specified compilers are in my PATH and executable.

What i'm doing wrong?

Regards
.....Volker


More information about the CMake mailing list