My project requires using gcc 4.0 when compiling on Mac OS X, as it has to 
support 10.4.  This works fine for the makefile generator, but it breaks with 
the XCode generator for Xcode 3.2 as the default gcc is v4.2.

Other posts on this list indicates that it's a bug in the Xcode generator.  I 
would like to workaround this issue somehow until a new version of cmake is 
released.

One poster suggested using gcc's -V option, which allows forcing the gcc 
version.  I've tried injecting this into the CMAKE_CXX_FLAGS like this:
        if (${CMAKE_GENERATOR} MATCHES "Xcode")
            set(CMAKE_CXX_FLAGS "-V 4.0 ${CMAKE_CXX_FLAGS}")
        endif(${CMAKE_GENERATOR} MATCHES "Xcode")

However, this creates a new error:
        '-V' must come at the start of the command line

It seems that the CMAKE_CXX_FLAGS are always appended to the constructed gcc 
command.  Is there some way that I can prepend flags (that is, put them at the 
very beginning of the command-line)?


Thanks,
aaron
_______________________________________________
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

Reply via email to