9ff1310af5
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> |
||
---|---|---|
.. | ||
android | ||
data | ||
mac | ||
qpa | ||
unix | ||
win32 | ||
winrt | ||
build_pass.prf | ||
cmake_functions.prf | ||
configure.prf | ||
create_cmake.prf | ||
ctest_testcase_common.prf | ||
ctest_testcase_installed.prf | ||
ctest_testcase.prf | ||
dbusadaptors.prf | ||
dbuscommon.pri | ||
dbusinterfaces.prf | ||
declarative_debug.prf | ||
default_post.prf | ||
default_pre.prf | ||
designer_defines.prf | ||
device_config.prf | ||
egl.prf | ||
exceptions_off.prf | ||
exceptions.prf | ||
exclusive_builds_post.prf | ||
exclusive_builds.prf | ||
gcov.prf | ||
include_source_dir.prf | ||
incredibuild_xge.prf | ||
java.prf | ||
lex.prf | ||
link_ltcg.prf | ||
link_pkgconfig.prf | ||
ltcg.prf | ||
moc.prf | ||
no_debug_info.prf | ||
plugin_bundle.prf | ||
precompile_header.prf | ||
qfeatures.prf | ||
qlalr.prf | ||
qml1_module.prf | ||
qml1_plugin.prf | ||
qml_debug.prf | ||
qml_module.prf | ||
qml_plugin.prf | ||
qmltestcase.prf | ||
qt_android_deps.prf | ||
qt_app.prf | ||
qt_build_config.prf | ||
qt_build_paths.prf | ||
qt_common.prf | ||
qt_config.prf | ||
qt_docs_targets.prf | ||
qt_docs.prf | ||
qt_example_installs.prf | ||
qt_functions.prf | ||
qt_helper_lib.prf | ||
qt_installs.prf | ||
qt_module_headers.prf | ||
qt_module_pris.prf | ||
qt_module.prf | ||
qt_parts.prf | ||
qt_plugin.prf | ||
qt_targets.prf | ||
qt_tool.prf | ||
qt.prf | ||
resolve_config.prf | ||
resolve_target.prf | ||
resources.prf | ||
sanitizer.prf | ||
silent.prf | ||
simd.prf | ||
spec_post.prf | ||
spec_pre.prf | ||
static_runtime.prf | ||
testcase_targets.prf | ||
testcase.prf | ||
testcocoon.prf | ||
testlib_defines.prf | ||
uic.prf | ||
use_c_linker.prf | ||
vxworks.prf | ||
warn_off.prf | ||
warn_on.prf | ||
wayland-scanner.prf | ||
xctest.prf | ||
yacc.prf |