[CMake] Selecting compiler on Windows platform

Josef Karthauser joe.karthauser at geomerics.com
Mon Oct 22 08:58:46 EDT 2007


> -----Original Message-----
> From: cmake-bounces+joe.karthauser=geomerics.com at cmake.org
> [mailto:cmake-bounces+joe.karthauser=geomerics.com at cmake.org] On Behalf
> Of a.neundorf-work at gmx.net
> Sent: 22 October 2007 13:36
> To: cmake at cmake.org
> Subject: Re: [CMake] Selecting compiler on Windows platform
> 
> On Monday 22 October 2007 11:34, Josef Karthauser wrote:
> ...
> > However, I’d like to control this from within a CMake file, and this
> > doesn’t appear possible.  From what I can see,
> CMakeDetermineCXXCompiler is
> > loaded and executed prior to the CMakeLists.txt file, which means
> that I
> > cannot set the compiler internally.  Is this true,
> 
> Yes, this is true.
> One reason is that one build tree must not use several compilers for
> one
> language, because all the configure checks are global for one build
> tree and
> so the results are only correct for the compiler which was used when
> they
> were executed.

This seems overly restrictive, a tree might contain a number of sub-trees which use different compilers.  Whilst I understand the need to keep things consistent by default, if a user wants to shoot themselves in the foot it ought to be allowed.  (Tools not policy! :)

I guess I'm going to have to run CMakeDetermineCXXCompiler again myself. :/.

Joe


More information about the CMake mailing list