Make the macx-xcode spec a wrapper around the default spec

... except for MAKEFILE_GENERATOR = XCODE. This means the spec no longer
hard-codes g++, and will work regardless of whether the default spec was
clang or g++.

This require us to set QMAKE_XCODE_GCC_VERSION properly for GCC, so that
additional compilation flags passed by Xcode will match the actual
compiler used.

Task-number: QTBUG-31713
Change-Id: If65140a7471cd16f483036742f1d5b86d0485c52
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
Tor Arne Vestbø 2013-06-13 14:26:48 +02:00 committed by The Qt Project
parent d668e19271
commit 47ab2edd01
3 changed files with 5 additions and 20 deletions

View File

@ -16,6 +16,8 @@ QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO += -g -gdwarf-2
QMAKE_LFLAGS_STATIC_LIB += -all_load
QMAKE_XCODE_GCC_VERSION = com.apple.compilers.llvmgcc42
QMAKE_OBJCFLAGS_PRECOMPILE = -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
QMAKE_OBJCXXFLAGS_PRECOMPILE = -x objective-c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}

View File

@ -1,5 +1,5 @@
# Unset makefile generator, so we can auto-detect value in default_post
unset(MAKEFILE_GENERATOR)
!macx-xcode: unset(MAKEFILE_GENERATOR)
load(default_pre)

View File

@ -4,23 +4,6 @@
# Mac OS X + XCode
#
MAKEFILE_GENERATOR = XCODE
CONFIG += lib_version_first incremental plugin_no_soname app_bundle
include(../$$[QMAKE_XSPEC]/qmake.conf)
include(../common/macx.conf)
include(../common/gcc-base-mac.conf)
include(../common/g++-macx.conf)
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
QMAKE_LINK =
QMAKE_LINK_C =
QMAKE_LINK_C_SHLIB =
QMAKE_LINK_SHLIB =
QMAKE_CFLAGS_HIDESYMS =
QMAKE_LFLAGS_VERSION =
QMAKE_LFLAGS_COMPAT_VERSION =
QMAKE_LFLAGS_SONAME =
QMAKE_INCDIR += /usr/local/include /System/Library/Frameworks/CarbonCore.framework/Headers
load(qt_config)
MAKEFILE_GENERATOR = XCODE