[CMake] CMake's Xcode generator seems to ignore the CMAKE_CXX_COMPILER variable

Stephan Aiche aiche at mi.fu-berlin.de
Tue Feb 24 11:05:23 EST 2009


Since you can only choose the following compilers in Xcode (at least  
in the version i have seen)

GCC 3.3 (GCC_VERSION = 3.3)
GCC 4.0 (GCC_VERSION = 4.0)
GCC 4.2 (GCC_VERSION = 4.2)
LLVM GCC 4.2 (GCC_VERSION = com.apple.compilers.llvmgcc42)

it seems reasonable (to me) to give also only this possibilities in  
CMake! Note that XCode offers those option even if some of those  
compilers are not installed. I think Xcode will not work with any  
compiler that was not installed with Xcode, at least I can not find  
any option inside of Xcode.

Stephan

On Feb 24, 2009, at 4:28 PM, Mathieu Malaterre wrote:

> On Tue, Feb 24, 2009 at 4:23 PM, Sean McBride <sean at rogue- 
> research.com> wrote:
>> On 2/24/09 10:01 AM, Bill Hoffman said:
>>
>>> That will not work with Xcode projects.  I am not sure how you tell
>>> Xcode to use a different compiler.  Any Xcode experts out there?
>>
>> The compiler choice is amongst the project/target settings.  In an
>> xcconfig file, you would use, for example:
>>
>> GCC_VERSION = 4.0
>>
>> or
>>
>> GCC_VERSION = 4.2
>>
>
> This would mean extracting the major.minor from: "gcc - 
> dumpversion" ...
>
>
> -- 
> Mathieu



More information about the CMake mailing list