summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-06-04 19:34:36 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-06-04 19:34:36 +0200
commit80604a0786628a0c57eac7cc856720537956cc7f (patch)
treee31b9b56584e77d6aefd4dfd072ce4e8e3648f3d /tools
parent1c901913c0af79b2bbde1b9da71f5267cb4fc76a (diff)
parentc11a7d16c7056da4086a87c9e85b89f8466be032 (diff)
Merge remote-tracking branch 'origin/stable' into dev
Conflicts: src/corelib/global/qglobal.h src/plugins/platforms/cocoa/qnsview.mm Change-Id: I6fe345df5c417cb7a55a3f91285d9b47a22c04fa
Diffstat (limited to 'tools')
-rw-r--r--tools/configure/configureapp.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 2304590c41..44498b6ccb 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -276,6 +276,8 @@ Configure::Configure(int& argc, char** argv)
dictionary[ "BUILDDEV" ] = "no";
+ dictionary[ "COMPILE_EXAMPLES" ] = "auto";
+
dictionary[ "C++11" ] = "auto";
dictionary[ "SHARED" ] = "yes";
@@ -458,6 +460,13 @@ void Configure::parseCmdLine()
dictionary[ "BUILDALL" ] = "yes";
else if (configCmdLine.at(i) == "-force-debug-info")
dictionary[ "FORCEDEBUGINFO" ] = "yes";
+
+ else if (configCmdLine.at(i) == "-compile-examples") {
+ dictionary[ "COMPILE_EXAMPLES" ] = "yes";
+ } else if (configCmdLine.at(i) == "-no-compile-examples") {
+ dictionary[ "COMPILE_EXAMPLES" ] = "no";
+ }
+
else if (configCmdLine.at(i) == "-c++11")
dictionary[ "C++11" ] = "yes";
else if (configCmdLine.at(i) == "-no-c++11")
@@ -1696,6 +1705,8 @@ bool Configure::displayHelp()
desc( "-skip <module>", "Exclude an entire module from the build.\n");
+ desc( "-compile-examples", "Compile examples even in a production build.\n");
+
desc("WIDGETS", "no", "-no-widgets", "Disable Qt Widgets module.\n");
desc("GUI", "no", "-no-gui", "Disable Qt GUI module.\n");
@@ -1979,6 +1990,13 @@ QString Configure::defaultTo(const QString &option)
&& (!QFile::exists(sourcePath + "/bin/syncqt.pl")))
return "no";
+ // Do not actually build the examples in production builds with -prefix, unless requested
+ if (option == "COMPILE_EXAMPLES"
+ && QDir::cleanPath(dictionary[ "QT_BUILD_TREE" ])
+ != QDir::cleanPath(dictionary[ "QT_INSTALL_PREFIX" ])
+ && dictionary[ "BUILDDEV" ] == "no")
+ return "no";
+
return "yes";
}
@@ -2560,6 +2578,8 @@ void Configure::generateOutputVars()
if (!buildParts.contains("libs"))
buildParts += "libs";
buildParts.removeDuplicates();
+ if (dictionary[ "COMPILE_EXAMPLES" ] == "yes")
+ qmakeConfig += "compile_examples";
if (dictionary["MSVC_MP"] == "yes")
qmakeConfig += "msvc_mp";