Reputation: 97
I am working on CentOS system which has gcc version 4.4.7. For installation of clang it needs the gcc version to be 4.7 or above. Hence I installed devtools and after running :
scl enable devtoolset-1.1 bash
gcc -v
It shows the version to be 4.7
but CMAKE_CXX_COMPILER_VERSION
still shows it to be 4.4.7
How to solve this issue?
Upvotes: 1
Views: 541
Reputation: 1056
CMake prefers the default compiler of the system, even when another compiler appears in PATH first. However you can set CC and CXX to force a different compiler.
CC=gcc CXX=g++ cmake ..
Upvotes: 3