My OS is centos which has a default gcc in path /usr/bin/gcc
. But it is old, I need a new version of gcc. So I install a new version in a new path /usr/local/bin/gcc
.
But when I run cmake
, it still uses the old version gcc path(/usr/bin/gcc
) . How can I specify the gcc to new path(/usr/local/bin/gcc
).
I have tried to overwrite /usr/bin/gcc
with /usr/local/bin/gcc
, but it not work.