[CMake] xcode gcc version

Lucas Thode ljthode at gmail.com
Wed Oct 14 14:44:08 EDT 2009


On Wed, Oct 14, 2009 at 11:31 AM, Clinton Stimpson <clinton at elemtech.com>wrote:

>
> I've found there's an xcode setting for this, but CMake doesn't put it in
> the
> generated xcode project.
> There's already a thing in the bug tracker for this.
> That would be ideal, instead of a method that requires root access and
> changes
> every xcode session.
>

> Thanks,
> Clint
>
> On Wednesday 14 October 2009 08:23:10 am Michael Jackson wrote:
> > Not sure how much of a help this is but I have the following in
> > my .bash_profile
> >
> > function gcc_select()
> > {
> >    echo "Changing GCC Version to $1"
> >    cd /usr/bin
> >    sudo ln -Fs c++-${1} c++
> >    sudo ln -Fs gcc-${1} cc
> >    sudo ln -Fs g++-${1} g++
> >    sudo ln -Fs gcc-${1} gcc
> >    sudo ln -Fs gcov-${1} gcov
> > }
> >
> > #gcc_select 4.2
> > echo "Use 'gcc_select [4.0 | 4.2 ] to set GCC to your desired Version"
> >
> > which lets me select which gcc gets used. I set this before I run any
> > CMake commands in a clean build directory and CMake seems to set the
> > correct GCC version in the Xcode projects. OS X 10.5.8 Intel.
>

GCC does have the -V option that tells the compiler driver which version of
the backend executables (cc1/...) to use.

--Lucas

> >
> > _________________________________________________________
> > Mike Jackson                  mike.jackson at bluequartz.net
> > BlueQuartz Software                    www.bluequartz.net
> > Principal Software Engineer                  Dayton, Ohio
> >
> > On Oct 13, 2009, at 6:12 PM, Clinton Stimpson wrote:
> > > Hi,
> > >
> > > What's the right way to specify which gcc compiler to use with xcode/
> > > cmake ?
> > > It looks like if one specifies g++-4.0 in cmake-gui, xcode doesn't
> > > use that
> > > compiler.
> > >
> > > Clint
> > > _______________________________________________
> > > Powered by www.kitware.com
> > >
> > > Visit other Kitware open-source projects at
> > > http://www.kitware.com/opensource/opensource.html
> > >
> > > Please keep messages on-topic and check the CMake FAQ at:
> > > http://www.cmake.org/Wiki/CMake_FAQ
> > >
> > > Follow this link to subscribe/unsubscribe:
> > > http://www.cmake.org/mailman/listinfo/cmake
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20091014/44ea931b/attachment.htm>


More information about the CMake mailing list