summaryrefslogtreecommitdiffstats
path: root/tools/configure
diff options
context:
space:
mode:
authorJames McDonnell <jmcdonnell@qnx.com>2016-03-18 11:32:13 -0400
committerJames McDonnell <jmcdonnell@qnx.com>2016-04-19 00:00:58 +0000
commitcc1a28d07e0771300403c06a00742b8648d3f70d (patch)
tree7bcb6ba9b145950c55c3a7dae696296bf214d6fe /tools/configure
parentf1e0eedcf501936e6b4f77b6fe3ac4997d757d94 (diff)
Add the ability to change precompiled header use
Give the Windows configureapp the same -pch/-no-pch arguments found in the Linux configure script. Using command line arguments to enable/disable precompiled header use is preferable to mkspec changes. Make -pch the default for all toolchains. In particular, this makes -pch the default for QNX on Windows. Previously, QNX on Windows had an implied default of -no-pch. Precompiled headers are the default for QNX on Linux; they should also be the default for QNX on Windows. A 'dictionary["PCH"] = "no"' will need to be added in Configure::applySpecSpecifics for any toolchain that should default to -no-pch (none known at this time). -no-pch is implemented by putting a "CONFIG -= precompile_header" in qmodule.pri. This ensures that Qt is built without precompiled headers (as requested) even if allowing precompiled header use is the default for the toolchain. Task-number: QTBUG-52578 Task-number: QTBUG-11545 Change-Id: I1b59bc2d416c5ba169161c5b3cc13accd76eeac8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'tools/configure')
-rw-r--r--tools/configure/configureapp.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index b599df45e3..6f1e2b7d2d 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -152,6 +152,7 @@ Configure::Configure(int& argc, char** argv) : verbose(0)
dictionary[ "GUI" ] = "yes";
dictionary[ "RTTI" ] = "yes";
dictionary[ "STRIP" ] = "yes";
+ dictionary[ "PCH" ] = "yes";
dictionary[ "SEPARATE_DEBUG_INFO" ] = "no";
dictionary[ "SSE2" ] = "auto";
dictionary[ "SSE3" ] = "auto";
@@ -859,6 +860,11 @@ void Configure::parseCmdLine()
else if (configCmdLine.at(i) == "-no-strip")
dictionary[ "STRIP" ] = "no";
+ else if (configCmdLine.at(i) == "-pch")
+ dictionary[ "PCH" ] = "yes";
+ else if (configCmdLine.at(i) == "-no-pch")
+ dictionary[ "PCH" ] = "no";
+
else if (configCmdLine.at(i) == "-accessibility")
dictionary[ "ACCESSIBILITY" ] = "yes";
else if (configCmdLine.at(i) == "-no-accessibility") {
@@ -1941,6 +1947,9 @@ bool Configure::displayHelp()
desc( "-L <librarypath>", "Add an explicit library path.");
desc( "-l <libraryname>", "Add an explicit library name, residing in a librarypath.\n");
+ desc("PCH", "no", "-no-pch", "Do not use precompiled header support.");
+ desc("PCH", "yes", "-pch", "Use precopmiled header support.\n");
+
desc( "-help, -h, -?", "Display this information.\n");
// 3rd party stuff options go below here --------------------------------------------------------------------------------
@@ -2748,6 +2757,11 @@ void Configure::generateOutputVars()
if (dictionary[ "RELEASE_TOOLS" ] == "yes")
qtConfig += "release_tools";
+ if (dictionary[ "PCH" ] == "yes")
+ qmakeConfig += "precompile_header";
+ else
+ qmakeVars += "CONFIG -= precompile_header";
+
if (dictionary[ "C++STD" ] == "c++11")
qtConfig += "c++11";
else if (dictionary[ "C++STD" ] == "c++14")
@@ -3854,6 +3868,7 @@ void Configure::displayConfig()
sout << "Force optimized tools......." << dictionary[ "RELEASE_TOOLS" ] << endl;
sout << "C++ language standard......." << dictionary[ "C++STD" ] << endl;
sout << "Link Time Code Generation..." << dictionary[ "LTCG" ] << endl;
+ sout << "Using PCH .................." << dictionary[ "PCH" ] << endl;
sout << "Accessibility support......." << dictionary[ "ACCESSIBILITY" ] << endl;
sout << "RTTI support................" << dictionary[ "RTTI" ] << endl;
sout << "SSE2 support................" << dictionary[ "SSE2" ] << endl;