GCC 4.0 will be selected as the compiler in Xcode if building against the OS X 10.4 SDK which is incompatible with GCC 4.2
Also made it possible to override the selected SDK from the configure line, by using something like:
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING='10.4' -DCMAKE_OSX_SYSROOT:PATH='/Developer/SDKs/MacOSX10.5.sdk'
Reviewed by: Poppy.