qt5base-lts/mkspecs/features
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
..
android Merge remote-tracking branch 'origin/5.3' into dev 2014-08-04 09:51:36 +02:00
data cmake: Don't mark header-only frameworks with the FRAMEWORK property. 2015-04-27 13:52:53 +00:00
mac Distinguish between Objective-C and Objective-C++ sources 2015-10-09 15:15:17 +00:00
qpa
unix Distinguish between Objective-C and Objective-C++ sources 2015-10-09 15:15:17 +00:00
win32 Merge remote-tracking branch 'origin/5.4' into 5.5 2015-04-15 09:09:24 +02:00
winrt Remove unused font deployment feature 2015-09-30 04:57:29 +00:00
build_pass.prf
cmake_functions.prf
configure.prf Merge remote-tracking branch 'origin/5.3' into 5.4 2014-10-28 18:21:45 +01:00
create_cmake.prf don't overengineer DESTDIR calculation 2015-04-23 09:49:23 +00:00
ctest_testcase_common.prf cmake: Generate INTERFACE targets for include-only modules. 2015-04-15 11:11:51 +00:00
ctest_testcase_installed.prf
ctest_testcase.prf
dbusadaptors.prf
dbuscommon.pri
dbusinterfaces.prf
declarative_debug.prf
default_post.prf Distinguish between Objective-C and Objective-C++ sources 2015-10-09 15:15:17 +00:00
default_pre.prf Run license checker in qmake 2015-05-27 10:23:10 +00:00
designer_defines.prf
device_config.prf Fix QMAKE_CXX/CROSS_COMPILE verification with ccache 2015-09-14 09:42:25 +00:00
egl.prf
exceptions_off.prf
exceptions.prf
exclusive_builds_post.prf
exclusive_builds.prf
gcov.prf Distinguish between Objective-C and Objective-C++ sources 2015-10-09 15:15:17 +00:00
include_source_dir.prf
incredibuild_xge.prf
java.prf actually use DIRLIST_SEPARATOR 2014-10-01 10:56:13 +02:00
lex.prf Use QMAKE_MOD_LEX/QMAKE_MOD_YACC in lex/yacc features 2015-09-24 13:49:29 +00:00
link_ltcg.prf Clean up ltcg.prf with variables, including a new static mode 2015-01-11 03:41:48 +01:00
link_pkgconfig.prf
ltcg.prf Clean up ltcg.prf with variables, including a new static mode 2015-01-11 03:41:48 +01:00
moc.prf Windows: Change the mocinclude extension to .opt 2015-09-29 09:16:00 +00:00
no_debug_info.prf Make no_debug_info also strip out -gstabs 2014-12-05 14:51:33 +01:00
plugin_bundle.prf Ensure that CONFIG += plugin_bundle will create Mach-O bundles on OSX/iOS 2015-05-24 11:46:14 +00:00
precompile_header.prf
qfeatures.prf
qlalr.prf
qml1_module.prf
qml1_plugin.prf
qml_debug.prf
qml_module.prf copy qml files only once in debug-and-release builds 2014-09-17 11:40:04 +02:00
qml_plugin.prf embed a VERSIONINFO resource into QML plugins 2015-06-05 13:08:41 +00:00
qmltestcase.prf
qt_android_deps.prf
qt_app.prf sanitize qt rpath handling, in particular on mac 2015-09-17 16:36:12 +00:00
qt_build_config.prf Build Qt for OS X and iOS with relative rpath. 2015-05-13 04:09:47 +00:00
qt_build_paths.prf
qt_common.prf Update the list of compilers we are free of warnings with 2015-09-22 06:21:20 +00:00
qt_config.prf support spaces in build and install dirs 2015-02-17 18:28:00 +00:00
qt_docs_targets.prf
qt_docs.prf
qt_example_installs.prf sanitize qt rpath handling, in particular on mac 2015-09-17 16:36:12 +00:00
qt_functions.prf inline qtAddModules() and dependencies 2015-09-17 16:36:23 +00:00
qt_helper_lib.prf restore qt4's qtLibraryTarget() behavior 2015-03-05 12:52:33 +00:00
qt_installs.prf
qt_module_headers.prf fix distclean targets 2015-04-23 19:16:57 +00:00
qt_module_pris.prf simplify qt rpath code 2015-09-17 16:36:08 +00:00
qt_module.prf sanitize qt rpath handling, in particular on mac 2015-09-17 16:36:12 +00:00
qt_parts.prf fix distclean targets 2015-04-23 19:16:57 +00:00
qt_plugin.prf sanitize qt rpath handling, in particular on mac 2015-09-17 16:36:12 +00:00
qt_targets.prf Update copyright headers 2015-02-11 06:49:51 +00:00
qt_tool.prf
qt.prf remove now superfluous QMAKE_*_VERSION_OVERRIDEs 2015-10-02 14:01:30 +00:00
resolve_config.prf Don't make Info.plist for debug framework bundles 2014-10-01 10:56:37 +02:00
resolve_target.prf unify handling of library prefixes and extensions 2015-10-01 16:19:30 +00:00
resources.prf Allow RESOURCES to contain standalone files and collections of files 2015-05-18 15:49:56 +00:00
sanitizer.prf Add support for gcc/clang's sanitize features 2014-10-02 19:45:00 +02:00
silent.prf
simd.prf Fix leaking ISA extensions in LTCG builds 2015-03-04 16:45:05 +00:00
spec_post.prf fix installing unix dll symlinks on windows hosts 2015-06-01 13:26:57 +00:00
spec_pre.prf Distinguish between Objective-C and Objective-C++ sources 2015-10-09 15:15:17 +00:00
static_runtime.prf Windows: Add -static-runtime configure option 2015-03-11 09:26:37 +00:00
testcase_targets.prf
testcase.prf Only run tests for the default exclusive builds target 2015-03-12 10:11:35 +00:00
testcocoon.prf
testlib_defines.prf Fixed compilation of auto tests using vc(x)proj files 2015-05-22 14:13:00 +00:00
uic.prf
use_c_linker.prf
vxworks.prf
warn_off.prf Distinguish between Objective-C and Objective-C++ sources 2015-10-09 15:15:17 +00:00
warn_on.prf Distinguish between Objective-C and Objective-C++ sources 2015-10-09 15:15:17 +00:00
wayland-scanner.prf
xctest.prf testlib: Don't limit linking to XCTest to Xcode projects 2015-03-30 13:26:58 +00:00
yacc.prf Use QMAKE_MOD_LEX/QMAKE_MOD_YACC in lex/yacc features 2015-09-24 13:49:29 +00:00