From 5f6af9de48eba5e505dfe67d4ec36cfefdf23da6 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 13 Jun 2014 15:12:28 -0700 Subject: Add the -qreal option to the Qt ABI information If -qreal float is passed, fullCpuArchitecture() will now include "-qreal_float". If something else other than "float" is passed to -qreal, we'll try to encode it (e.g., -qreal "fixed"). Change-Id: Ie33fd1a643f4376e6f01a7966e01c7c34e6fcffd Reviewed-by: Oswald Buddenhagen --- tools/configure/configureapp.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 06083f2592..a1877eb2c6 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -431,7 +431,15 @@ void Configure::parseCmdLine() ++i; if (i == argCount) break; - dictionary[ "QREAL" ] = configCmdLine.at(i); + QString s = dictionary[ "QREAL" ] = configCmdLine.at(i); + if (s == "float") { + dictionary[ "QREAL_STRING" ] = "\"float\""; + } else { + // escape + s = s.simplified(); + s = '"' + s.toLatin1().toPercentEncoding(QByteArray(), "-._~", '_') + '"'; + dictionary[ "QREAL_STRING" ] = s; + } } else if (configCmdLine.at(i) == "-release") { @@ -3492,8 +3500,10 @@ void Configure::generateConfigfiles() if (dictionary[ "IWMMXT" ] == "yes") tmpStream << "#define QT_COMPILER_SUPPORTS_IWMMXT 1" << endl; - if (dictionary["QREAL"] != "double") + if (dictionary["QREAL"] != "double") { tmpStream << "#define QT_COORD_TYPE " << dictionary["QREAL"] << endl; + tmpStream << "#define QT_COORD_TYPE_STRING " << dictionary["QREAL_STRING"] << endl; + } tmpStream << endl << "// Compile time features" << endl; -- cgit v1.2.3