2012-03-16 15:00:33 +00:00
#
# compiler settings for iOS clang compilers
#
# Depends on:
#
# QMAKE_IOS_XCODE_VERSION - set in mkspecs/common/ios/versions.conf
#
# iOS build flags
2012-11-01 12:18:15 +00:00
QMAKE_IOS_CFLAGS += -fvisibility=hidden -fpascal-strings -fmessage-length=0
2012-03-16 15:00:33 +00:00
QMAKE_IOS_CFLAGS += -Wno-trigraphs -Wreturn-type -Wparentheses -Wswitch -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-shorten-64-to-32 -Wno-sign-conversion
2012-11-01 12:18:15 +00:00
QMAKE_IOS_CXXFLAGS += -fvisibility-inlines-hidden
QMAKE_IOS_OBJ_CFLAGS += -Wno-arc-abi -Wc++0x-extensions
2012-03-16 15:00:33 +00:00
2012-11-01 11:31:36 +00:00
# Clang 3.1 (and above) flags
QMAKE_IOS_CFLAGS += -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wformat -Wno-missing-braces -Wno-unused-function -Wno-unused-label -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-sign-compare -Wpointer-sign -Wno-newline-eof -Wdeprecated-declarations -Winvalid-offsetof -Wno-conversion
QMAKE_IOS_CXXFLAGS += -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wc++11-extensions
QMAKE_IOS_OBJ_CFLAGS += -Wno-deprecated-implementations -Wprotocol -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector
2012-03-16 15:00:33 +00:00
2012-11-01 11:31:36 +00:00
# Warn about unsupported (later than 4.5) Xcode versions
!lessThan(QMAKE_IOS_XCODE_VERSION, "4.6"): warning("The version of Xcode installed on this system is not recognised - custom compiler settings may be necessary")
2012-03-16 15:00:33 +00:00
# Set build flags
QMAKE_CFLAGS += $$QMAKE_IOS_CFLAGS
QMAKE_CXXFLAGS += $$QMAKE_IOS_CFLAGS $$QMAKE_IOS_CXXFLAGS
QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_IOS_CFLAGS $$QMAKE_IOS_CXXFLAGS $$QMAKE_IOS_OBJ_CFLAGS
QMAKE_IOS_CFLAGS =
QMAKE_IOS_CXXFLAGS =
QMAKE_IOS_OBJ_CFLAGS =