[CMake] Not getting the CXX/CC I requested with v 2.4.5

Alan W. Irwin irwin at beluga.phys.uvic.ca
Mon Nov 12 14:51:26 EST 2007


On 2007-11-12 09:59-0500 Pugmire, Dave wrote:

>
> Hi,
> I'm experiencing some weirdness trying to configure on a cray.
> I do the following:
> env CXX=g++ CC=gcc ./bootstrap
> configure seems to report that it's using g++ to do the checks.
> However, when I do a make, it's using a different compiler.

My experience (on Linux) is setting environment variables to select your
compilers and associated flags just works.  However, there are some caveats.

You must set the environment variables _before_ cmake is invoked _in an
empty build tree_.  If you did that exactly, and "make" still uses the wrong
set of compilers, then there may be some CMake bug for the compiler
specification on the Cray platform.  But usually such questions are
generated by someone who specified the environment variables after cmake was
invoked or who ran cmake in a dirty build tree.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list