SV: [CMake] Check for working CXX compiler in linux

Mathieu Malaterre mathieu.malaterre at kitware.com
Tue Sep 6 09:34:52 EDT 2005


Peter Vanroose wrote:
>>Check for working CXX compiler: CMAKE_CXX_COMPILER_FULLPATH-NOTFOUND
>>CMake Error: your CXX compiler: CMAKE_CXX_COMPILER_FULLPATH-NOTFOUND
>>was not found in your path.   For CMake to correctly use try compile
>>commands, the compiler must be in your path.   Please add the
>>compiler to your PATH environment, and re-run CMake. 
>>
>>gcc/g++ is installed. what package(s) I need more?
> 
> 
> Find out where gcc is installed; let's say it is in /opt/gcc/bin
> Then change the PATH variable as follows:
> 
> PATH=/opt/gcc/bin:$PATH
> export PATH
> 
> Next run CMake.

Or directly (to garantee which compiler will be picked):

export CXX=/my/exotic/path/bin/g++
export CC=/my/exotic/path/bin/gcc

then run cmake

Mathieu


More information about the CMake mailing list