[CMake] Setting the cmake compiler...

Peter Soetens peter.soetens at fmtc.be
Fri Oct 20 08:09:20 EDT 2006


The following happened to me (cmake version 2.4-patch 2) :

$ mkdir build
$ cd build
$ cmake .. -DCMAKE_CXX_COMPILER=g++ -DCMAKE_CC_COMPILER=gcc
-- Check for working C compiler: gcc
-- Check for working C compiler: gcc -- works
-- Check size of void*
-- Check size of void* - done
-- Check for working CXX compiler: g++
-- Check for working CXX compiler: g++ -- works

[ ... a bit later ... ]

-- Looking for C++ include ftd2xx.h
CMake Error: your CXX compiler: "/home/sspr/src/orocos-components/build/g++" 
was not found.   Please set CMAKE_CXX_COMPILER to a valid compiler path or 
name.
CMake Error: Internal CMake error, TryCompile configure of cmake failed

First it works, then suddenly it doesn't [1]. Now I see cmake wants an 
absolute path, so I do the following:

$ cmake .. -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_CC_COMPILER=/usr/bin/gcc
CMake Error: your CXX compiler: "/home/sspr/src/orocos-components/build2/g++" 
was not found.   Please set CMAKE_CXX_COMPILER to a valid compiler path or 
name.
[...]

That's just what I did[2] !

Why did [1] and [2] occur ? Both seem as bugs to me...

Peter
-- 
Peter Soetens -- FMTC -- <http://www.fmtc.be>


More information about the CMake mailing list