qt5base-lts/mkspecs
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-g++ move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
aix-g++-64 move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
aix-xlc move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
aix-xlc-64 move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
android-g++ Merge remote-tracking branch 'origin/5.4' into 5.5 2015-03-31 10:03:31 +02:00
blackberry-armle-v7-qcc Update copyright headers 2015-02-11 06:49:51 +00:00
blackberry-x86-qcc Update copyright headers 2015-02-11 06:49:51 +00:00
common Distinguish between Objective-C and Objective-C++ sources 2015-10-09 15:15:17 +00:00
cygwin-g++ unify handling of library prefixes and extensions 2015-10-01 16:19:30 +00:00
darwin-g++ move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
devices mkspecs: add option to enable boot2qt platform 2015-08-25 19:35:22 +00:00
features Distinguish between Objective-C and Objective-C++ sources 2015-10-09 15:15:17 +00:00
freebsd-g++ move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
freebsd-g++46 move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
freebsd-icc move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
haiku-g++ move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
hpux-acc move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
hpux-acc-64 move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
hpux-acc-o64 move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
hpux-g++ move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
hpux-g++-64 move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
hpuxi-acc-32 move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
hpuxi-acc-64 move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
hpuxi-g++-64 move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
hurd-g++ move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
irix-cc move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
irix-cc-64 move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
irix-g++ move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
irix-g++-64 move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
linux-arm-gnueabi-g++ Update copyright headers 2015-02-11 06:49:51 +00:00
linux-clang Update copyright headers 2015-02-11 06:49:51 +00:00
linux-clang-libc++ Update copyright headers 2015-02-11 06:49:51 +00:00
linux-cxx move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
linux-g++ Fix for platform socklen_t on other C libraries than glibc. 2015-09-30 05:04:20 +00:00
linux-g++-32 move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
linux-g++-64 move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
linux-icc ICC: Remove the -fno-jump-tables workaround. 2015-09-21 16:39:51 +00:00
linux-icc-32 Update copyright headers 2015-02-11 06:49:51 +00:00
linux-icc-64 Update copyright headers 2015-02-11 06:49:51 +00:00
linux-kcc move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
linux-llvm Update copyright headers 2015-02-11 06:49:51 +00:00
linux-lsb-g++ Update copyright headers 2015-02-11 06:49:51 +00:00
linux-pgcc move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
lynxos-g++ move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
macx-clang Update copyright headers 2015-02-11 06:49:51 +00:00
macx-clang-32 Distinguish between Objective-C and Objective-C++ sources 2015-10-09 15:15:17 +00:00
macx-g++ Update copyright headers 2015-02-11 06:49:51 +00:00
macx-g++40 Update copyright headers 2015-02-11 06:49:51 +00:00
macx-g++42 Update copyright headers 2015-02-11 06:49:51 +00:00
macx-g++-32 Distinguish between Objective-C and Objective-C++ sources 2015-10-09 15:15:17 +00:00
macx-icc Distinguish between Objective-C and Objective-C++ sources 2015-10-09 15:15:17 +00:00
macx-ios-clang Distinguish between Objective-C and Objective-C++ sources 2015-10-09 15:15:17 +00:00
macx-llvm Update copyright headers 2015-02-11 06:49:51 +00:00
macx-xcode Xcode: Set DYLD_IMAGE_SUFFIX=_debug when launching Debug configuration 2015-10-01 23:01:46 +00:00
modules Adjust wiki links to the new redirect 2015-03-04 15:36:12 +00:00
netbsd-g++ move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
openbsd-g++ move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
qnx-armle-v7-qcc Update copyright headers 2015-02-11 06:49:51 +00:00
qnx-x86-qcc Update copyright headers 2015-02-11 06:49:51 +00:00
sco-cc Update copyright headers 2015-02-11 06:49:51 +00:00
sco-g++ move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
solaris-cc move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
solaris-cc-64 move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
solaris-cc-64-stlport Update copyright headers 2015-02-11 06:49:51 +00:00
solaris-cc-stlport Update copyright headers 2015-02-11 06:49:51 +00:00
solaris-g++ move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
solaris-g++-64 move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
tru64-cxx move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
tru64-g++ move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
unixware-cc move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
unixware-g++ move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
unsupported move inclusions of unix.conf (and related files) near the top 2015-10-01 16:19:27 +00:00
win32-g++ merge MingwMakefileGenerator::findLibraries() into Win32MakefileGenerator 2015-10-02 14:01:24 +00:00
win32-icc unify handling of library prefixes and extensions 2015-10-01 16:19:30 +00:00
win32-msvc2005 centralize setup of shell-related variables in spec_post.prf 2015-03-06 19:08:40 +00:00
win32-msvc2008 centralize setup of shell-related variables in spec_post.prf 2015-03-06 19:08:40 +00:00
win32-msvc2010 centralize setup of shell-related variables in spec_post.prf 2015-03-06 19:08:40 +00:00
win32-msvc2012 centralize setup of shell-related variables in spec_post.prf 2015-03-06 19:08:40 +00:00
win32-msvc2013 centralize setup of shell-related variables in spec_post.prf 2015-03-06 19:08:40 +00:00
win32-msvc2015 centralize setup of shell-related variables in spec_post.prf 2015-03-06 19:08:40 +00:00
wince60standard-armv4i-msvc2005 Update copyright headers 2015-02-11 06:49:51 +00:00
wince60standard-x86-msvc2005 Update copyright headers 2015-02-11 06:49:51 +00:00
wince70embedded-armv4i-msvc2008 Update copyright headers 2015-02-11 06:49:51 +00:00
wince70embedded-x86-msvc2008 Update copyright headers 2015-02-11 06:49:51 +00:00
wince80colibri-armv7-msvc2012 Added Mkspec for Toradex WEC2013 SDK 2015-07-06 10:57:17 +00:00
winphone-arm-msvc2013 WinRT: Deployqt version/copyright information to dlls 2015-09-13 22:03:11 +00:00
winphone-x86-msvc2013 WinRT: Deployqt version/copyright information to dlls 2015-09-13 22:03:11 +00:00
winrt-arm-msvc2013 Update copyright headers 2015-02-11 06:49:51 +00:00
winrt-arm-msvc2015 WinRT: Link against correct c-runtime 2015-08-07 10:33:01 +00:00
winrt-x64-msvc2013 Update copyright headers 2015-02-11 06:49:51 +00:00
winrt-x64-msvc2015 WinRT: Link against correct c-runtime 2015-08-07 10:33:01 +00:00
winrt-x86-msvc2013 Update copyright headers 2015-02-11 06:49:51 +00:00
winrt-x86-msvc2015 WinRT: Link against correct c-runtime 2015-08-07 10:33:01 +00:00