Travis: CMake seems to loose (can not find) compiler version

463 views Asked by At

Have a problem testing the Ubuntu CMake g++ build on Travis.

What is important I have to upgrade gcc/g++ to at least 4.7 version first.

sudo apt-get install gcc-4.8 g++-4.8

(4.8 is good as well)

I tried a lot of configs and finally found that Travis version of cmake does not see ANY compiler version.

CMAKE_C_COMPILER: /usr/bin/gcc-4.8
CMAKE_CXX_COMPILER: /usr/bin/g++-4.8
CMAKE_CXX_COMPILER_VERSION:       <<<<<<<<<empty! 

So my tests for compiler version always fail ...

CMake Error at CMakeLists.txt:22 (message):
GCC version must be at least 4.8!

Here is the build log:

https://travis-ci.org/Paku-/travistest/builds/66662613

Any ideas ?

PS.

  • Tested using alternatives, the same.

  • Tested on local Ubuntu virtual machine - working as it should.

1

There are 1 answers

0
Paul Paku On BEST ANSWER

It's solved ... I did not know the CMAKE_CXX_COMPILER_VERSION is only supported from v.2.8.9. While Travis cmake is v.2.8.7