[CMake] CMake cvs TOT and Xcode

Bill Hoffman bill.hoffman at kitware.com
Fri Oct 2 14:05:09 EDT 2009


James Bigler wrote:
> On Fri, Oct 2, 2009 at 9:32 AM, Bill Hoffman <bill.hoffman at kitware.com> wrote:
>> Sean McBride wrote:
>>> On 10/2/09 10:40 AM, Bill Hoffman said:
>>>
>>>> We did change CMake.  Before we used to hard code the build archs into
>>>> the file (i386, ppc, etc.).   We now use a variable that Xcode uses,
>>>> something like $(DEFAULT_ARCH) different name, but you get the idea. If that
>>>> is not defined for some reason for this version of Xcode we can fix it.
>>>>  CMake knows what version it is building for.  We did have this same problem
>>>> with Xcode 1.5 and did a fix.   So, since this is most likely a regression,
>>>> I would like to fix it.   However, I don't have access to Xcode 3.0 so it is
>>>> hard to fix... :)
>>> Xcode 3.0 is free to download, though you do need a (free) ADC account:
>>> https://connect.apple.com
>>>
>>> You can also have multiple versions of Xcode installed simultaneously,
>>> so you could have 3.0 and 3.1.4 installed.  (I'm not sure how well CMake
>>> itself would deal with this though.)
>>>
>>> And the Xcode release notes have a detailed account of what changed when:
>>> <http://developer.apple.com/mac/library/releasenotes/DeveloperTools/RN-
>>> Xcode/index.html>
>>>
>>> I bet if you searched it for 'something like $(DEFAULT_ARCH)' you'd find
>>> when that was added (probably 3.1).
>> Well, let me rephrase that....  I don't want to install Xcode 3.0 if I don't
>> have to...  :)
>>
>> Hmmm, looking at the code:
>>
>> cmGlobalXcodeGenerator.cxx line 2645:
>>
>>  if(this->XcodeVersion >= 32)
>>      {
>>      osxArch = "$(ARCHS_STANDARD_32_64_BIT)";
>>      }
>>  else if(this->XcodeVersion <= 25)
>>      {
>> #ifdef __i386
>>      osxArch = "i386";
>> #endif
>> #ifdef __ppc__
>>      osxArch = "ppc";
>> #endif
>>      }
>>    else
>>      {
>>      osxArch = "$(ARCHS_STANDARD_32_BIT)";
>>      }
>>
>>
>> I bet 30 had the ARCHS_STANDARD_32_64_BIT.  So, James, can you try changing
>> CMake to have  if(this->XcodeVersion >= 30) and see if it fixes the problem?
>>
>> -Bill
>>
>>
> 
> Bill, that didn't seem to fix the problem.  I attached the source and
> build directory with --debug-trycompile ran.
> 
> I also verified the version and osxArch values:
> 
> /code/cmake-cvs/Source/cmGlobalXCodeGenerator.cxx:2645 this->XcodeVersion == 30
> /code/cmake-cvs/Source/cmGlobalXCodeGenerator.cxx:2663 osxArch =
> $(ARCHS_STANDARD_32_64_BIT)
> 

Can you get it to build the solution from the GUI and produce an 
executable?  If you load it in the gui what is the active arch?


-Bill


More information about the CMake mailing list