qt5base-lts/mkspecs/common
Tor Arne Vestbø 9ff1310af5 Distinguish between Objective-C and Objective-C++ sources
Instead of lumping both Objective-C (.m) and Objective-C++ (.mm) sources
into the same pile, passing them on to the same compiler as for C++ (CXX),
with the C++ flags (CXXFLAGS), we follow Apple's lead and treat them as
variants of the C and C++ languages separately, so that Objective-C
sources are built with CC and with CFLAGS, and Objective-C++ sources
with CXX, and CXXFLAGS.

This lets us remove a lot of duplicated flags and definitions from the
QMAKE_OBJECTIVE_CFLAGS variable, which in 99% of the cases just matched
the C++ equivalent. The remaining Objective-C/C++ flags are added to
CFLAGS/CXXFLAGS, as the compiler will just ignore them when running in
C/C++ mode. This matches Xcode, which also doesn't have a separate build
setting for Objective-C/C++ flags.

The Makefile qmake generator has been rewritten to support Objective-C/C++
fully, by not assuming that we're just iterating over the C and C++
extensions when dealing with compilation rules, precompiled headers, etc.
There's some duplicated logic in this code, as inherent by qmake's already
duplicated code paths, but this can be cleaned up when C++11 support is
mandatory and we can use lambda functions.

Task-number: QTBUG-36575
Change-Id: I4f06576d5f49e939333a2e03d965da54119e5e31
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-10-09 15:15:17 +00:00
..
aix Update copyright headers 2015-02-11 06:49:51 +00:00
android Update copyright headers 2015-02-11 06:49:51 +00:00
c89 Update copyright headers 2015-02-11 06:49:51 +00:00
ios Distinguish between Objective-C and Objective-C++ sources 2015-10-09 15:15:17 +00:00
mac QNativeSocketEngine: add code to receive IP header data 2015-08-22 22:26:33 +00:00
nacl Update copyright headers 2015-02-11 06:49:51 +00:00
posix Update copyright headers 2015-02-11 06:49:51 +00:00
qnx Update copyright headers 2015-02-11 06:49:51 +00:00
wince unify handling of library prefixes and extensions 2015-10-01 16:19:30 +00:00
winrt_winphone unify handling of library prefixes and extensions 2015-10-01 16:19:30 +00:00
clang-mac.conf Distinguish between Objective-C and Objective-C++ sources 2015-10-09 15:15:17 +00:00
clang.conf Add detection of C++14 and C++1z compiler features 2015-09-05 23:05:40 +00:00
g++-base.conf Add detection of C++14 and C++1z compiler features 2015-09-05 23:05:40 +00:00
g++-macx.conf Remove the -load_all option from the linker enabling static builds 2015-01-07 09:57:07 +01:00
g++-unix.conf Fix '=' alignment and replace tabs in *.conf (whitespace only change) 2013-03-27 17:16:37 +01:00
g++.conf Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
gcc-base-mac.conf Distinguish between Objective-C and Objective-C++ sources 2015-10-09 15:15:17 +00:00
gcc-base-unix.conf Add a linker version script to Qt libraries 2015-09-13 18:54:17 +00:00
gcc-base.conf Merge remote-tracking branch 'origin/5.4' into merge5.5 2015-05-08 13:26:44 +02:00
ios.conf Fix '=' alignment and replace tabs in *.conf (whitespace only change) 2013-03-27 17:16:37 +01:00
linux-android.conf purge vestiges of opengl es 1 support 2014-04-04 19:32:21 +02:00
linux.conf move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
llvm.conf Refer to Apple products by their actual names. 2013-07-10 17:32:48 +02:00
mac.conf move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
macx.conf Merge "Merge branch 'stable' into dev" into refs/staging/dev 2013-07-12 14:03:21 +02:00
msvc-desktop.conf unify handling of library prefixes and extensions 2015-10-01 16:19:30 +00:00
qcc-base-qnx-armle-v7.conf move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
qcc-base-qnx-x86.conf move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
qcc-base-qnx.conf fix place of "qnx" in $$QMAKE_PLATFORM 2015-10-01 16:18:55 +00:00
qcc-base.conf Merge remote-tracking branch 'origin/5.4' into merge5.5 2015-05-08 13:26:44 +02:00
sanitize.conf Add support for gcc/clang's sanitize features 2014-10-02 19:45:00 +02:00
shell-unix.conf centralize setup of shell-related variables in spec_post.prf 2015-03-06 19:08:40 +00:00
shell-win32.conf centralize setup of shell-related variables in spec_post.prf 2015-03-06 19:08:40 +00:00
unix.conf unify handling of library prefixes and extensions 2015-10-01 16:19:30 +00:00