summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2012-09-18 22:01:10 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-18 17:42:40 +0200
commit6226fcdc3e4ace4636c58778ef53fbf69f46c36e (patch)
treefed05f2fbd0a4b34c6a2dfb1eacfd3ddce33fb66 /mkspecs
parenta2e4b7a92fad04fc6c73a71ede003ccbdf7b5305 (diff)
add a .qmake.conf file which load()s qt_build_config
that way we don't have to auto-generate code for that in the configures. note that we now load qt_build_config.prf instead of just qmodule.pri, which means that exceptions_off is set everywhere. we forcibly re-enable them for testcases to minimize the deviation from default 3rd party usage. testlib selftests are not qt testcases, so the one that needs exceptions needs to enable them explicitly. Change-Id: I1b9360bb11f2e80c92a2b63a7c45991ad17fda1b Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/qt_build_config.prf5
-rw-r--r--mkspecs/features/testcase.prf6
2 files changed, 9 insertions, 2 deletions
diff --git a/mkspecs/features/qt_build_config.prf b/mkspecs/features/qt_build_config.prf
index 6b412291bb..a2ad4429c1 100644
--- a/mkspecs/features/qt_build_config.prf
+++ b/mkspecs/features/qt_build_config.prf
@@ -15,5 +15,6 @@ mac {
}
}
-# Qt modules get compiled without exceptions enabled by default
-CONFIG += exceptions_off
+# Qt modules get compiled without exceptions enabled by default.
+# However, testcases should be still built with exceptions.
+CONFIG += exceptions_off testcase_exceptions
diff --git a/mkspecs/features/testcase.prf b/mkspecs/features/testcase.prf
index 64065018f3..faf4eeb124 100644
--- a/mkspecs/features/testcase.prf
+++ b/mkspecs/features/testcase.prf
@@ -1,5 +1,11 @@
have_target {
+# qt_build_config.prf disables execptions for all Qt modules which don't
+# explicitly turn it on again, while the qmake default is to build with
+# exceptions. As we want tests to be built like 3rd party applications,
+# qt_build_config tells us to re-enable exceptions here.
+testcase_exceptions: CONFIG += exceptions
+
check.files =
check.path = .