diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2016-03-13 18:39:03 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2016-03-13 19:27:21 +0000 |
commit | 59a3ca679ede2cb9b6a162edf8eba5cf6d9af4a9 (patch) | |
tree | 0d0f76caa042db299cddaa84c14c28e4c80b2ffd /mkspecs/features | |
parent | 447a508d003ce487f2be69af9ab05aeec272e64d (diff) | |
parent | 50d0f57b77b8088875d7185c5906b5f57985d5fb (diff) |
Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7
Diffstat (limited to 'mkspecs/features')
-rw-r--r-- | mkspecs/features/benchmark.prf | 1 | ||||
-rw-r--r-- | mkspecs/features/default_post.prf | 13 | ||||
-rw-r--r-- | mkspecs/features/qt_common.prf | 4 | ||||
-rw-r--r-- | mkspecs/features/qt_module_pris.prf | 7 | ||||
-rw-r--r-- | mkspecs/features/testcase.prf | 43 | ||||
-rw-r--r-- | mkspecs/features/testcase_targets.prf | 10 |
6 files changed, 51 insertions, 27 deletions
diff --git a/mkspecs/features/benchmark.prf b/mkspecs/features/benchmark.prf new file mode 100644 index 0000000000..bfae922700 --- /dev/null +++ b/mkspecs/features/benchmark.prf @@ -0,0 +1 @@ +load(testcase) diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf index cd8d8859aa..e7e9a5bd87 100644 --- a/mkspecs/features/default_post.prf +++ b/mkspecs/features/default_post.prf @@ -96,9 +96,16 @@ breakpad { } c++11|c++14|c++1z { - c++1z: cxxstd = CXX1Z - else: c++14: cxxstd = CXX14 - else: cxxstd = CXX11 + # Disable special compiler flags for host builds + !host_build|!cross_compile { + c++1z: cxxstd = CXX1Z + else: c++14: cxxstd = CXX14 + else: cxxstd = CXX11 + } else { + # Fall back to c++11, because since 5.7 c++11 is required everywhere, + # including host builds + cxxstd = CXX11 + } # Check if we should disable the GNU extensions or not !strict_c++:!isEmpty(QMAKE_CXXFLAGS_GNU$$cxxstd): cxxstd = GNU$$cxxstd diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf index 07300842a0..c1c668aec8 100644 --- a/mkspecs/features/qt_common.prf +++ b/mkspecs/features/qt_common.prf @@ -84,9 +84,9 @@ warnings_are_errors:warning_clean { QMAKE_CXXFLAGS_WARN_ON += -Werror -ww177,1224,1478,1881 $$WERROR } } else:gcc:!clang:!intel_icc { - # GCC 4.6-4.9, 5.x + # GCC 4.6-4.9, 5.x, ... ver = $${QT_GCC_MAJOR_VERSION}.$${QT_GCC_MINOR_VERSION} - contains(ver, "(4\\.[6789]|5\\..)") { + contains(ver, "(4\\.[6789]|[5-9]\\..)") { QMAKE_CXXFLAGS_WARN_ON += -Werror -Wno-error=cpp -Wno-error=deprecated-declarations $$WERROR # GCC prints this bogus warning, after it has inlined a lot of code diff --git a/mkspecs/features/qt_module_pris.prf b/mkspecs/features/qt_module_pris.prf index 8b717c98f4..9c45350543 100644 --- a/mkspecs/features/qt_module_pris.prf +++ b/mkspecs/features/qt_module_pris.prf @@ -42,8 +42,11 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri module_libs = "\$\$QT_MODULE_HOST_LIB_BASE" else: \ module_libs = "\$\$QT_MODULE_LIB_BASE" - !isEmpty(QT_PRIVATE): \ - module_rundep = "QT.$${MODULE_ID}.run_depends = $$replace(QT_PRIVATE, -private$, _private)" + # In addition to the library's private deps, the private module's deps + # are logically runtime deps of the public module. + runtime_deps = $$QT_PRIVATE $$QT_FOR_PRIVATE + !isEmpty(runtime_deps): \ + module_rundep = "QT.$${MODULE_ID}.run_depends = $$replace(runtime_deps, -private$, _private)" else: \ module_rundep = module_build_type = v2 diff --git a/mkspecs/features/testcase.prf b/mkspecs/features/testcase.prf index e6eace190e..08ed00715d 100644 --- a/mkspecs/features/testcase.prf +++ b/mkspecs/features/testcase.prf @@ -6,13 +6,16 @@ have_target { # qt_build_config tells us to re-enable exceptions here. testcase_exceptions: CONFIG += exceptions -check.files = -check.path = . +benchmark: type = benchmark +else: type = check + +$${type}.files = +$${type}.path = . # Add environment for non-installed builds. Do this first, so the # 'make' variable expansions don't end up in a batch file/script. QT_TOOL_NAME = target -qtAddTargetEnv(check.commands, QT) +qtAddTargetEnv($${type}.commands, QT) # If the test ends up in a different directory, we should cd to that directory. TESTRUN_CWD = $$DESTDIR @@ -27,44 +30,44 @@ debug_and_release:debug_and_release_target { } # Allow for a custom test runner script -check.commands += $(TESTRUNNER) +$${type}.commands += $(TESTRUNNER) unix { isEmpty(TEST_TARGET_DIR): TEST_TARGET_DIR = . app_bundle: \ - check.commands += $${TEST_TARGET_DIR}/$(QMAKE_TARGET).app/Contents/MacOS/$(QMAKE_TARGET) + $${type}.commands += $${TEST_TARGET_DIR}/$(QMAKE_TARGET).app/Contents/MacOS/$(QMAKE_TARGET) else: \ - check.commands += $${TEST_TARGET_DIR}/$(QMAKE_TARGET) + $${type}.commands += $${TEST_TARGET_DIR}/$(QMAKE_TARGET) } else { # Windows !isEmpty(TEST_TARGET_DIR): TEST_TARGET_DIR = $${TEST_TARGET_DIR}$${QMAKE_DIR_SEP} - check.commands += $${TEST_TARGET_DIR}$(TARGET) + $${type}.commands += $${TEST_TARGET_DIR}$(TARGET) } # Allow for custom arguments to tests -check.commands += $(TESTARGS) +$${type}.commands += $(TESTARGS) !isEmpty(TESTRUN_CWD):!contains(TESTRUN_CWD, ^\\./?): \ - check.commands = cd $$shell_path($$TESTRUN_CWD) && $$check.commands + $${type}.commands = cd $$shell_path($$TESTRUN_CWD) && $$eval($${type}.commands) # If the test is marked as insignificant, discard the exit code -insignificant_test:check.commands = -$${check.commands} +insignificant_test: $${type}.commands = -$$eval($${type}.commands) -QMAKE_EXTRA_TARGETS *= check +QMAKE_EXTRA_TARGETS *= $${type} isEmpty(BUILDS)|build_pass { - check.depends = first + $${type}.depends = first } else { # For exclusive builds, only run the test once. - check.CONFIG = recursive - check.target = check_all - check.recurse_target = check - check.commands = - - check_first.depends = $$eval($$first(BUILDS).target)-check - check_first.target = check - QMAKE_EXTRA_TARGETS += check_first + $${type}.CONFIG = recursive + $${type}.target = $${type}_all + $${type}.recurse_target = $${type} + $${type}.commands = + + $${type}_first.depends = $$eval($$first(BUILDS).target)-$${type} + $${type}_first.target = $${type} + QMAKE_EXTRA_TARGETS += $${type}_first } !no_testcase_installs:!contains(INSTALLS, target) { diff --git a/mkspecs/features/testcase_targets.prf b/mkspecs/features/testcase_targets.prf index e9b107735a..16ec6a9f0d 100644 --- a/mkspecs/features/testcase_targets.prf +++ b/mkspecs/features/testcase_targets.prf @@ -7,3 +7,13 @@ check.depends = first # `make check' implies build QMAKE_EXTRA_TARGETS += check } + +# ... and the same for benchmarks, too. +!contains(QMAKE_EXTRA_TARGETS, benchmark) { + contains(TEMPLATE, subdirs): \ + prepareRecursiveTarget(benchmark) + else: \ + benchmark.depends = first # `make benchmark' implies build + QMAKE_EXTRA_TARGETS += benchmark +} + |