This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
How does "configure" and "cmake" determines the gcc's version?
- From: Glen <cnglen at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Thu, 25 Apr 2013 08:55:23 -0400
- Subject: How does "configure" and "cmake" determines the gcc's version?
Hi.
Two version of gcc live in my linux:
(1) The default gcc version located in /usr/bin is 4.4.
(2) I installed a newer version of gcc 4.8, located in ~/opt/bin/gcc.
I set "PATH=~/opt/bin:${PATH}", so I when I type gcc in the shell, it
uses 4.8 version.
However, when I build the code, either "./configure" or "cmake ..":
the gcc found is the old version 4.4, NOT 4.8;
I have to type "CC=gcc CPP=g++ ./configure" each time.
How does "configure" and "cmake" determines the gcc's version? Is
there someway to set the default gcc when using cmake or configure?
--
Best Regards,
Glen