[CMake] How to use non-default compiler in building a project

Kris Thielemans kris.thielemans at csc.mrc.ac.uk
Thu Sep 22 07:20:25 EDT 2005


Many thanks Brad.

That works perfectly.


Kris
> -----Original Message-----
> From: Brad King [mailto:brad.king at kitware.com] 
> Sent: 21 September 2005 18:38
> To: Kris Thielemans
> Cc: cmake at cmake.org
> Subject: Re: [CMake] How to use non-default compiler in 
> building a project
> 
> 
> Kris Thielemans wrote:
> > I'm trying to install ITK on Linux but seem to have a cmake related 
> > problem. However, it might have something to the with how ITK uses 
> > cmake, so I apologise in advance if that's the case.
> > 
> > I do not want to use the default compiler that cmake finds 
> (gcc,c++), 
> > but another version (gcc-3.3, g++-3.3).
> [snip]
> > Is there anything I can do to get this to work?
> 
> The compiler cannot be changed after the first configure because 
> try-compile resluts may be inaccurate as a result.  You can set the 
> compilers in the environment variables CC=gcc-3.3 and 
> CXX=g++-3.3 before 
> running CMake.
> 
> -Brad
> 



More information about the CMake mailing list