summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2016-06-15 23:21:03 -0700
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2016-12-23 13:45:39 +0000
commit04403d5b12debadf95b565bf84e0527ae787c87d (patch)
tree9a9599075577cbbf27ed61247f7676c5e00e600b
parent4d9fbb33458c82aaf37d9712495a0653aae70533 (diff)
Merge all "win32-msvc*" mkspecs into one
Since we can tell the MSVC version from the compiler now, each of the qmake.conf files is now the same, so let's just have "win32-msvc" and be future-proof. Likewise for win32-clang-msvc. qplatformdefs.h was already common. Since we can't obtain the MSVC version from the unified mkspec name any more, I dropped the warning level during the qmake bootstrap to reduce the number of warnings that need to be disabled from compiler version to version. There is no point in keeping the old mkspecs, but configure will re-map the -platform argument to the unified spec as necessary, to keep existing configure command lines working. [ChangeLog][Visual Studio] Qt now has a common mkspec for all Visual Studio versions, called "win32-msvc". The old names which contained the version number are now gone (but qmake scopes based on the old names continue to work). The version of the compiler can be obtained from the MSC_VER and MSVC_VER variables (for example, for Visual Studio 2015, those contain the values 1900 and 14.0, respectively). Those variables are also available with the Intel compiler (win32-icc) and with Clang (win32-clang-msvc). Done-with: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Change-Id: Ib57b52598e2f452985e9fffd14587c0a77a5c09c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
-rw-r--r--mkspecs/common/msvc-desktop.conf2
-rw-r--r--mkspecs/common/msvc-version.conf18
-rw-r--r--mkspecs/win32-clang-msvc/qmake.conf (renamed from mkspecs/win32-clang-msvc2015/qmake.conf)4
-rw-r--r--mkspecs/win32-clang-msvc/qplatformdefs.h (renamed from mkspecs/win32-msvc2008/qplatformdefs.h)2
-rw-r--r--mkspecs/win32-clang-msvc2015/qplatformdefs.h34
-rw-r--r--mkspecs/win32-icc/qplatformdefs.h2
-rw-r--r--mkspecs/win32-msvc/qmake.conf8
-rw-r--r--mkspecs/win32-msvc/qplatformdefs.h (renamed from mkspecs/win32-msvc2005/qplatformdefs.h)0
-rw-r--r--mkspecs/win32-msvc2005/qmake.conf8
-rw-r--r--mkspecs/win32-msvc2008/qmake.conf8
-rw-r--r--mkspecs/win32-msvc2010/qmake.conf8
-rw-r--r--mkspecs/win32-msvc2010/qplatformdefs.h40
-rw-r--r--mkspecs/win32-msvc2012/qmake.conf8
-rw-r--r--mkspecs/win32-msvc2012/qplatformdefs.h40
-rw-r--r--mkspecs/win32-msvc2013/qmake.conf8
-rw-r--r--mkspecs/win32-msvc2013/qplatformdefs.h40
-rw-r--r--mkspecs/win32-msvc2015/qmake.conf8
-rw-r--r--mkspecs/win32-msvc2015/qplatformdefs.h40
-rw-r--r--mkspecs/win32-msvc2017/qmake.conf8
-rw-r--r--mkspecs/win32-msvc2017/qplatformdefs.h34
-rw-r--r--qmake/Makefile.win3215
-rw-r--r--tools/configure/Makefile.mingw10
-rw-r--r--tools/configure/Makefile.win329
-rw-r--r--tools/configure/configure.pro7
-rw-r--r--tools/configure/configureapp.cpp13
-rw-r--r--tools/configure/environment.cpp85
-rw-r--r--tools/configure/environment.h8
27 files changed, 62 insertions, 405 deletions
diff --git a/mkspecs/common/msvc-desktop.conf b/mkspecs/common/msvc-desktop.conf
index 604321551b..52d9408c1c 100644
--- a/mkspecs/common/msvc-desktop.conf
+++ b/mkspecs/common/msvc-desktop.conf
@@ -1,6 +1,6 @@
#
# qmake configuration for Microsoft Visual Studio C/C++ Compiler
-# This mkspec is used for all win32-msvcXXXX specs
+# This mkspec is used by the win32-msvc and win32-clang-msvc specs
#
#
diff --git a/mkspecs/common/msvc-version.conf b/mkspecs/common/msvc-version.conf
index 8158ee37ab..147009cd9f 100644
--- a/mkspecs/common/msvc-version.conf
+++ b/mkspecs/common/msvc-version.conf
@@ -1,7 +1,7 @@
#
# qmake configuration for Microsoft Visual Studio C/C++ Compiler
-# This mkspec is used for all win32-msvcXXXX, winrt-XXX-msvcXXX
-# and winphone-XXX-msvcXXX specs
+# This file is used by win32-msvc, win32-clang-msvc, and all
+# winphone-XXX-msvcXXXX specs
#
#
@@ -11,10 +11,12 @@
isEmpty(QMAKE_MSC_VER): error("msvc-version.conf loaded but QMAKE_MSC_VER isn't set")
MSVC_VER = 8.0
+COMPAT_MKSPEC = win32-msvc2005
greaterThan(QMAKE_MSC_VER, 1499) {
# Visual Studio 2008 (9.0) / Visual C++ 15.0 and up
MSVC_VER = 9.0
+ COMPAT_MKSPEC = win32-msvc2008
QMAKE_CFLAGS_MP = -MP
QMAKE_CXXFLAGS_MP = $$QMAKE_CFLAGS_MP
}
@@ -22,6 +24,7 @@ greaterThan(QMAKE_MSC_VER, 1499) {
greaterThan(QMAKE_MSC_VER, 1599) {
# Visual Studio 2010 (10.0) / Visual C++ 16.0 and up
MSVC_VER = 10.0
+ COMPAT_MKSPEC = win32-msvc2010
MAKEFILE_GENERATOR = MSBUILD
QMAKE_CFLAGS_AVX = -arch:AVX
@@ -33,6 +36,7 @@ greaterThan(QMAKE_MSC_VER, 1599) {
greaterThan(QMAKE_MSC_VER, 1699) {
# Visual Studio 2012 (11.0) / Visual C++ 17.0 and up
MSVC_VER = 11.0
+ COMPAT_MKSPEC = win32-msvc2012
QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -D_HAS_EXCEPTIONS=0
QT_CONFIG += c++11
CONFIG += c++11
@@ -41,6 +45,7 @@ greaterThan(QMAKE_MSC_VER, 1699) {
greaterThan(QMAKE_MSC_VER, 1799) {
# Visual Studio 2013 (12.0) / Visual C++ 18.0 and up
MSVC_VER = 12.0
+ COMPAT_MKSPEC = win32-msvc2013
QMAKE_CFLAGS += -FS
QMAKE_CXXFLAGS += -FS
@@ -55,6 +60,7 @@ greaterThan(QMAKE_MSC_VER, 1799) {
greaterThan(QMAKE_MSC_VER, 1899) {
# Visual Studio 2015 (14.0) / Visual C++ 19.0 and up
MSVC_VER = 14.0
+ COMPAT_MKSPEC = win32-msvc2015
QMAKE_CFLAGS += -Zc:strictStrings
QMAKE_CFLAGS_WARN_ON += -w44456 -w44457 -w44458
QMAKE_CFLAGS_AVX2 = -arch:AVX2
@@ -65,4 +71,12 @@ greaterThan(QMAKE_MSC_VER, 1899) {
greaterThan(QMAKE_MSC_VER, 1909) {
# Visual Studio 2017 (15.0) / Visual C++ 19.10 and up
MSVC_VER = 15.0
+ COMPAT_MKSPEC = win32-msvc2017
}
+
+greaterThan(QMAKE_MSC_VER, 1910) {
+ # No compat spec past MSVC 2017
+ COMPAT_MKSPEC =
+}
+
+!isEmpty(COMPAT_MKSPEC):!$$COMPAT_MKSPEC: CONFIG += $$COMPAT_MKSPEC
diff --git a/mkspecs/win32-clang-msvc2015/qmake.conf b/mkspecs/win32-clang-msvc/qmake.conf
index aa78ebf83b..0041788ef9 100644
--- a/mkspecs/win32-clang-msvc2015/qmake.conf
+++ b/mkspecs/win32-clang-msvc/qmake.conf
@@ -1,8 +1,6 @@
#
-# qmake configuration for win32-clang-msvc2015
-
+# qmake configuration for win32-clang-msvc
#
-# Written for Clang 3.8 with Microsoft Visual C++ 2015 Update 1
# Notice: this uses the clang-cl wrapper
#
diff --git a/mkspecs/win32-msvc2008/qplatformdefs.h b/mkspecs/win32-clang-msvc/qplatformdefs.h
index 9c59826555..8a3afa7630 100644
--- a/mkspecs/win32-msvc2008/qplatformdefs.h
+++ b/mkspecs/win32-clang-msvc/qplatformdefs.h
@@ -37,4 +37,4 @@
**
****************************************************************************/
-#include "../win32-msvc2005/qplatformdefs.h"
+#include "../win32-msvc/qplatformdefs.h"
diff --git a/mkspecs/win32-clang-msvc2015/qplatformdefs.h b/mkspecs/win32-clang-msvc2015/qplatformdefs.h
deleted file mode 100644
index 7100e3aa41..0000000000
--- a/mkspecs/win32-clang-msvc2015/qplatformdefs.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL21$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "../win32-msvc2005/qplatformdefs.h"
diff --git a/mkspecs/win32-icc/qplatformdefs.h b/mkspecs/win32-icc/qplatformdefs.h
index 9c59826555..8a3afa7630 100644
--- a/mkspecs/win32-icc/qplatformdefs.h
+++ b/mkspecs/win32-icc/qplatformdefs.h
@@ -37,4 +37,4 @@
**
****************************************************************************/
-#include "../win32-msvc2005/qplatformdefs.h"
+#include "../win32-msvc/qplatformdefs.h"
diff --git a/mkspecs/win32-msvc/qmake.conf b/mkspecs/win32-msvc/qmake.conf
new file mode 100644
index 0000000000..1d8b8f0e97
--- /dev/null
+++ b/mkspecs/win32-msvc/qmake.conf
@@ -0,0 +1,8 @@
+#
+# qmake configuration for win32-msvc
+#
+# Written for Microsoft Visual C++ (all desktop versions)
+#
+
+include(../common/msvc-desktop.conf)
+load(qt_config)
diff --git a/mkspecs/win32-msvc2005/qplatformdefs.h b/mkspecs/win32-msvc/qplatformdefs.h
index 9573d18a40..9573d18a40 100644
--- a/mkspecs/win32-msvc2005/qplatformdefs.h
+++ b/mkspecs/win32-msvc/qplatformdefs.h
diff --git a/mkspecs/win32-msvc2005/qmake.conf b/mkspecs/win32-msvc2005/qmake.conf
deleted file mode 100644
index 3fbf797b5b..0000000000
--- a/mkspecs/win32-msvc2005/qmake.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# qmake configuration for win32-msvc2005
-#
-# Written for Microsoft Visual C++ 2005
-#
-
-include(../common/msvc-desktop.conf)
-load(qt_config)
diff --git a/mkspecs/win32-msvc2008/qmake.conf b/mkspecs/win32-msvc2008/qmake.conf
deleted file mode 100644
index 0d9eac7008..0000000000
--- a/mkspecs/win32-msvc2008/qmake.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# qmake configuration for win32-msvc2008
-#
-# Written for Microsoft Visual C++ 2008
-#
-
-include(../common/msvc-desktop.conf)
-load(qt_config)
diff --git a/mkspecs/win32-msvc2010/qmake.conf b/mkspecs/win32-msvc2010/qmake.conf
deleted file mode 100644
index 3b8a50f17a..0000000000
--- a/mkspecs/win32-msvc2010/qmake.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# qmake configuration for win32-msvc2010
-#
-# Written for Microsoft Visual C++ 2010
-#
-
-include(../common/msvc-desktop.conf)
-load(qt_config)
diff --git a/mkspecs/win32-msvc2010/qplatformdefs.h b/mkspecs/win32-msvc2010/qplatformdefs.h
deleted file mode 100644
index 9c59826555..0000000000
--- a/mkspecs/win32-msvc2010/qplatformdefs.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "../win32-msvc2005/qplatformdefs.h"
diff --git a/mkspecs/win32-msvc2012/qmake.conf b/mkspecs/win32-msvc2012/qmake.conf
deleted file mode 100644
index 25aaf1f5d1..0000000000
--- a/mkspecs/win32-msvc2012/qmake.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# qmake configuration for win32-msvc2012
-#
-# Written for Microsoft Visual C++ 2012
-#
-
-include(../common/msvc-desktop.conf)
-load(qt_config)
diff --git a/mkspecs/win32-msvc2012/qplatformdefs.h b/mkspecs/win32-msvc2012/qplatformdefs.h
deleted file mode 100644
index 9c59826555..0000000000
--- a/mkspecs/win32-msvc2012/qplatformdefs.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "../win32-msvc2005/qplatformdefs.h"
diff --git a/mkspecs/win32-msvc2013/qmake.conf b/mkspecs/win32-msvc2013/qmake.conf
deleted file mode 100644
index 87f72317ba..0000000000
--- a/mkspecs/win32-msvc2013/qmake.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# qmake configuration for win32-msvc2013
-#
-# Written for Microsoft Visual C++ 2013
-#
-
-include(../common/msvc-desktop.conf)
-load(qt_config)
diff --git a/mkspecs/win32-msvc2013/qplatformdefs.h b/mkspecs/win32-msvc2013/qplatformdefs.h
deleted file mode 100644
index 9c59826555..0000000000
--- a/mkspecs/win32-msvc2013/qplatformdefs.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "../win32-msvc2005/qplatformdefs.h"
diff --git a/mkspecs/win32-msvc2015/qmake.conf b/mkspecs/win32-msvc2015/qmake.conf
deleted file mode 100644
index e1f5376894..0000000000
--- a/mkspecs/win32-msvc2015/qmake.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# qmake configuration for win32-msvc2015
-#
-# Written for Microsoft Visual C++ 2015
-#
-
-include(../common/msvc-desktop.conf)
-load(qt_config)
diff --git a/mkspecs/win32-msvc2015/qplatformdefs.h b/mkspecs/win32-msvc2015/qplatformdefs.h
deleted file mode 100644
index 9c59826555..0000000000
--- a/mkspecs/win32-msvc2015/qplatformdefs.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "../win32-msvc2005/qplatformdefs.h"
diff --git a/mkspecs/win32-msvc2017/qmake.conf b/mkspecs/win32-msvc2017/qmake.conf
deleted file mode 100644
index c945c8c00d..0000000000
--- a/mkspecs/win32-msvc2017/qmake.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# qmake configuration for win32-msvc2017
-#
-# Written for Microsoft Visual C++ 2017
-#
-
-include(../common/msvc-desktop.conf)
-load(qt_config)
diff --git a/mkspecs/win32-msvc2017/qplatformdefs.h b/mkspecs/win32-msvc2017/qplatformdefs.h
deleted file mode 100644
index 7100e3aa41..0000000000
--- a/mkspecs/win32-msvc2017/qplatformdefs.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL21$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "../win32-msvc2005/qplatformdefs.h"
diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32
index 862c1e833e..8e41facde2 100644
--- a/qmake/Makefile.win32
+++ b/qmake/Makefile.win32
@@ -14,29 +14,24 @@ QMKSRC = $(SOURCE_PATH)\qmake
CXX = icl
LINKER = link
CFLAGS_EXTRA = /Zc:forScope /Qstd=c++11
-!elseif "$(QMAKESPEC)" == "win32-clang-msvc2015"
+!elseif "$(QMAKESPEC)" == "win32-clang-msvc"
CXX = clang-cl
LINKER = link
CFLAGS_EXTRA = -fms-compatibility-version=19.00.23506 -Wno-microsoft-enum-value
!else
CXX = cl
LINKER = link
-! if "$(QMAKESPEC)" == "win32-msvc2013"
-CFLAGS_EXTRA = /MP /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS $(CFLAGS_CRT)
-! elseif "$(QMAKESPEC)" == "win32-msvc2015" || "$(QMAKESPEC)" == "win32-msvc2017" || "$(QMAKESPEC)" == "win32-clang-msvc2015"
-CFLAGS_EXTRA = /MP /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS /Zc:strictStrings /w44456 /w44457 /w44458 /wd4577 $(CFLAGS_CRT)
-! else
-! error Unsupported compiler for this Makefile
-! endif
+CFLAGS_EXTRA = /MP /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS \
+ /wd4577 $(CFLAGS_CRT)
!endif # !win32-icc
-!if "$(QMAKESPEC)" != "win32-clang-msvc2015"
+!if "$(QMAKESPEC)" != "win32-clang-msvc"
CFLAGS_PCH = -Yuqmake_pch.h -FIqmake_pch.h -Fpqmake_pch.pch
PCH_OBJECT = qmake_pch.obj
!endif
CFLAGS_BARE = -c -Fo./ -Fdqmake.pdb \
- -W3 -nologo -O1 \
+ -W2 -nologo -O1 \
$(CFLAGS_EXTRA) \
-I$(QMKSRC) -I$(QMKSRC)\library -I$(QMKSRC)\generators -I$(QMKSRC)\generators\unix -I$(QMKSRC)\generators\win32 -I$(QMKSRC)\generators\mac \
-I$(INC_PATH) -I$(INC_PATH)\QtCore -I$(INC_PATH)\QtCore\$(QT_VERSION) -I$(INC_PATH)\QtCore\$(QT_VERSION)\QtCore \
diff --git a/tools/configure/Makefile.mingw b/tools/configure/Makefile.mingw
index b61dc38de4..ccc3a64cdf 100644
--- a/tools/configure/Makefile.mingw
+++ b/tools/configure/Makefile.mingw
@@ -1,11 +1,10 @@
CORESRC = $(QTSRC)src/corelib
-TOOLSRC = $(QTSRC)tools
-CONFSRC = $(TOOLSRC)/configure
+CONFSRC = $(QTSRC)tools/configure
RAW_PCH = configure_pch.h
PCH = $(RAW_PCH).gch/c++
DEFINES = -DUNICODE -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DQT_BUILD_CONFIGURE -DQT_USE_QSTRINGBUILDER -DQT_VERSION_STR=\"$(QTVERSION)\" -DQT_VERSION_MAJOR=$(QT_VERSION_MAJOR) -DQT_VERSION_MINOR=$(QT_VERSION_MINOR) -DQT_VERSION_PATCH=$(QT_VERSION_PATCH)
-INCPATH = -I"../../include" -I"../../include/QtCore" -I"../../include/QtCore/$(QTVERSION)" -I"../../include/QtCore/$(QTVERSION)/QtCore" -I"$(TOOLSRC)/shared" -I"$(QTSRC)mkspecs/win32-g++"
+INCPATH = -I"../../include" -I"../../include/QtCore" -I"../../include/QtCore/$(QTVERSION)" -I"../../include/QtCore/$(QTVERSION)/QtCore" -I"$(QTSRC)mkspecs/win32-g++"
CXXFLAGS_BARE = -std=c++11 -fno-rtti -fno-exceptions -mthreads -Wall -Wextra $(DEFINES) $(INCPATH)
CXXFLAGS = -include $(RAW_PCH) $(CXXFLAGS_BARE)
LINK = g++
@@ -70,8 +69,7 @@ OBJECTS = \
qmalloc.o \
qxmlstream.o \
qxmlutils.o \
- quuid.o \
- registry.o
+ quuid.o
$(TARGET): $(OBJECTS)
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS)
@@ -112,7 +110,7 @@ $(PCH): $(CONFSRC)/configure_pch.h
@$(CHK_DIR_EXISTS) $(RAW_PCH).gch $(CHK_DIR_EXISTS_GLUE) $(MKDIR) $(RAW_PCH).gch
$(CXX) -x c++-header -c $(CXXFLAGS_BARE) -o $@ $<
-VPATH = $(CONFSRC):$(TOOLSRC)/shared/windows:$(CORESRC)/global:$(CORESRC)/kernel:$(CORESRC)/tools:$(CORESRC)/codecs:$(CORESRC)/io:$(CORESRC)/xml:$(CORESRC)/plugin
+VPATH = $(CONFSRC):$(CORESRC)/global:$(CORESRC)/kernel:$(CORESRC)/tools:$(CORESRC)/codecs:$(CORESRC)/io:$(CORESRC)/xml:$(CORESRC)/plugin
main.o: $(CONFSRC)/configureapp.h
configureapp.o: $(CONFSRC)/configureapp.h $(CONFSRC)/environment.h
diff --git a/tools/configure/Makefile.win32 b/tools/configure/Makefile.win32
index 8864d6fc8f..f0199343be 100644
--- a/tools/configure/Makefile.win32
+++ b/tools/configure/Makefile.win32
@@ -1,9 +1,8 @@
CORESRC = $(QTSRC)src\corelib
-TOOLSRC = $(QTSRC)tools
-CONFSRC = $(TOOLSRC)\configure
+CONFSRC = $(QTSRC)tools\configure
DEFINES = -DUNICODE -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DQT_BUILD_CONFIGURE -DQT_USE_QSTRINGBUILDER -DQT_VERSION_STR=\"$(QTVERSION)\" -DQT_VERSION_MAJOR=$(QT_VERSION_MAJOR) -DQT_VERSION_MINOR=$(QT_VERSION_MINOR) -DQT_VERSION_PATCH=$(QT_VERSION_PATCH)
-INCPATH = -I"..\..\include" -I"..\..\include\QtCore" -I"..\..\include\QtCore\$(QTVERSION)" -I"..\..\include\QtCore\$(QTVERSION)\QtCore" -I"$(TOOLSRC)\shared" -I"$(QTSRC)mkspecs\win32-msvc2012"
+INCPATH = -I"..\..\include" -I"..\..\include\QtCore" -I"..\..\include\QtCore\$(QTVERSION)" -I"..\..\include\QtCore\$(QTVERSION)\QtCore" -I"$(QTSRC)mkspecs\win32-msvc"
CXXFLAGS_BARE = -nologo -Zc:wchar_t -W3 -GR -EHsc -w34100 -w34189 -wd4577 $(CFLAGS_CRT) $(EXTRA_CXXFLAGS) $(DEFINES) $(INCPATH)
!IF ("$(CXX)" != "clang-cl")
PCH = configure_pch.pch
@@ -76,7 +75,6 @@ OBJECTS = \
qxmlstream.obj \
qxmlutils.obj \
quuid.obj \
- registry.obj \
$(PCH_OBJECT)
$(TARGET): $(OBJECTS)
@@ -98,7 +96,6 @@ $(OBJECTS): $(PCH)
main.obj: $(CONFSRC)\main.cpp $(CONFSRC)\configureapp.h $(PCH)
configureapp.obj: $(CONFSRC)\configureapp.cpp $(CONFSRC)\configureapp.h $(CONFSRC)\environment.h $(PCH)
environment.obj: $(CONFSRC)\environment.cpp $(CONFSRC)\environment.h $(PCH)
-registry.obj: $(TOOLSRC)\shared\windows\registry.cpp $(PCH)
qarraydata.obj: $(CORESRC)\tools\qarraydata.cpp $(PCH)
qbytearray.obj: $(CORESRC)\tools\qbytearray.cpp $(PCH)
qbytearraymatcher.obj: $(CORESRC)\tools\qbytearraymatcher.cpp $(PCH)
@@ -157,8 +154,6 @@ quuid.obj: $(CORESRC)\plugin\quuid.cpp $(PCH)
{$(CONFSRC)}.cpp{}.obj::
$(CXX) -c $(CXXFLAGS) $<
-{$(TOOLSRC)\shared\windows}.cpp{}.obj::
- $(CXX) -c $(CXXFLAGS) $<
{$(CORESRC)\tools}.cpp{}.obj::
$(CXX) -c $(CXXFLAGS) $<
{$(CORESRC)\codecs}.cpp{}.obj::
diff --git a/tools/configure/configure.pro b/tools/configure/configure.pro
index 93e6a197a2..90da2de119 100644
--- a/tools/configure/configure.pro
+++ b/tools/configure/configure.pro
@@ -76,9 +76,7 @@ HEADERS = configureapp.h environment.h \
$$QT_SOURCE_TREE/src/corelib/tools/qunicodetables_p.h \
$$QT_SOURCE_TREE/src/corelib/kernel/qsystemerror_p.h \
$$QT_SOURCE_TREE/src/corelib/xml/qxmlstream.h \
- $$QT_SOURCE_TREE/src/corelib/xml/qxmlutils_p.h \
- $$QT_SOURCE_TREE/tools/shared/windows/registry_p.h
-
+ $$QT_SOURCE_TREE/src/corelib/xml/qxmlutils_p.h
SOURCES = main.cpp configureapp.cpp environment.cpp \
$$QT_SOURCE_TREE/src/corelib/tools/qbytearray.cpp \
@@ -134,5 +132,4 @@ SOURCES = main.cpp configureapp.cpp environment.cpp \
$$QT_SOURCE_TREE/src/corelib/xml/qxmlstream.cpp \
$$QT_SOURCE_TREE/src/corelib/xml/qxmlutils.cpp \
$$QT_SOURCE_TREE/src/corelib/plugin/quuid.cpp \
- $$QT_SOURCE_TREE/src/corelib/tools/qcryptographichash.cpp \
- $$QT_SOURCE_TREE/tools/shared/windows/registry.cpp
+ $$QT_SOURCE_TREE/src/corelib/tools/qcryptographichash.cpp
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 2ffec0707f..6a09705cc1 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -163,6 +163,14 @@ void Configure::parseCmdLine()
mkspecs << mkspec;
}
+ if (dictionary[ "QMAKESPEC" ] == "win32-msvc2012"
+ || dictionary[ "QMAKESPEC" ] == "win32-msvc2013"
+ || dictionary[ "QMAKESPEC" ] == "win32-msvc2015"
+ || dictionary[ "QMAKESPEC" ] == "win32-msvc2017") {
+ cout << "\nNotice: re-mapping requested qmake spec to unified 'win32-msvc'.\n\n";
+ dictionary[ "QMAKESPEC" ] = "win32-msvc";
+ }
+
if (dictionary["QMAKESPEC"].toLower() == "features"
|| !mkspecs.contains(dictionary["QMAKESPEC"], Qt::CaseInsensitive)) {
dictionary[ "DONE" ] = "error";
@@ -175,10 +183,7 @@ void Configure::parseCmdLine()
cout << "See the README file for a list of supported operating systems and compilers." << endl;
} else {
if (dictionary[ "QMAKESPEC" ].endsWith("-icc") ||
- dictionary[ "QMAKESPEC" ].endsWith("-msvc2012") ||
- dictionary[ "QMAKESPEC" ].endsWith("-msvc2013") ||
- dictionary[ "QMAKESPEC" ].endsWith("-msvc2015") ||
- dictionary[ "QMAKESPEC" ].endsWith("-msvc2017")) {
+ dictionary[ "QMAKESPEC" ].contains("-msvc")) {
if (dictionary[ "MAKE" ].isEmpty()) dictionary[ "MAKE" ] = "nmake";
dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32";
} else if (dictionary[ "QMAKESPEC" ].startsWith(QLatin1String("win32-g++"))) {
diff --git a/tools/configure/environment.cpp b/tools/configure/environment.cpp
index 260af276fa..312e2f9e56 100644
--- a/tools/configure/environment.cpp
+++ b/tools/configure/environment.cpp
@@ -51,25 +51,18 @@ using namespace std;
#include <qt_windows.h>
#endif
-#include <windows/registry_p.h> // from tools/shared
-
QT_BEGIN_NAMESPACE
struct CompilerInfo{
Compiler compiler;
const char *compilerStr;
- const char *regKey;
const char *executable;
} compiler_info[] = {
// The compilers here are sorted in a reversed-preferred order
- {CC_MINGW, "MinGW (Minimalist GNU for Windows)", 0, "g++.exe"},
- {CC_INTEL, "Intel(R) C++ Compiler for 32-bit applications", 0, "icl.exe"}, // xilink.exe, xilink5.exe, xilink6.exe, xilib.exe
- {CC_MSVC2012, "Microsoft (R) Visual Studio 2012 C/C++ Compiler (11.0)", "Software\\Microsoft\\VisualStudio\\SxS\\VC7\\11.0", "cl.exe"}, // link.exe, lib.exe
- {CC_MSVC2013, "Microsoft (R) Visual Studio 2013 C/C++ Compiler (12.0)", "Software\\Microsoft\\VisualStudio\\SxS\\VC7\\12.0", "cl.exe"}, // link.exe, lib.exe
- // Microsoft skipped version 13
- {CC_MSVC2015, "Microsoft (R) Visual Studio 2015 C/C++ Compiler (14.0)", "Software\\Microsoft\\VisualStudio\\SxS\\VS7\\14.0", "cl.exe"}, // link.exe, lib.exe
- {CC_MSVC2017, "Microsoft (R) Visual Studio 2017 C/C++ Compiler (15.0)", "Software\\Microsoft\\VisualStudio\\SxS\\VS7\\15.0", "cl.exe"}, // link.exe, lib.exe
- {CC_UNKNOWN, "Unknown", 0, 0},
+ {CC_MINGW, "MinGW (Minimalist GNU for Windows)", "g++.exe"},
+ {CC_INTEL, "Intel(R) C++ Compiler for 32-bit applications", "icl.exe"}, // xilink.exe, xilink5.exe, xilink6.exe, xilib.exe
+ {CC_MSVC, "Microsoft (R) Visual Studio C/C++ Compiler", "cl.exe"}, // link.exe, lib.exe
+ {CC_UNKNOWN, "Unknown", 0},
};
@@ -94,17 +87,8 @@ QString Environment::detectQMakeSpec()
{
QString spec;
switch (detectCompiler()) {
- case CC_MSVC2017:
- spec = "win32-msvc2017";
- break;
- case CC_MSVC2015:
- spec = "win32-msvc2015";
- break;
- case CC_MSVC2013:
- spec = "win32-msvc2013";
- break;
- case CC_MSVC2012:
- spec = "win32-msvc2012";
+ case CC_MSVC:
+ spec = "win32-msvc";
break;
case CC_INTEL:
spec = "win32-icc";
@@ -128,61 +112,15 @@ QString Environment::detectQMakeSpec()
*/
Compiler Environment::detectCompiler()
{
-#ifndef Q_OS_WIN32
- return CC_UNKNOWN; // Always generate CC_UNKNOWN on other platforms
-#else
if(detectedCompiler != CC_UNKNOWN)
return detectedCompiler;
int installed = 0;
-
- // Check for compilers in registry first, to see which version is in PATH
- QString paths = qgetenv("PATH");
- QStringList pathlist = paths.toLower().split(";");
- for(int i = 0; compiler_info[i].compiler; ++i) {
- QString productPath = qt_readRegistryKey(HKEY_LOCAL_MACHINE, compiler_info[i].regKey,
- KEY_WOW64_32KEY).toLower();
- if (productPath.length()) {
- QStringList::iterator it;
- for(it = pathlist.begin(); it != pathlist.end(); ++it) {
- if((*it).contains(productPath)) {
- if (detectedCompiler != compiler_info[i].compiler) {
- ++installed;
- detectedCompiler = compiler_info[i].compiler;
- }
- /* else {
-
- We detected the same compiler again, which happens when
- configure is build with the 64-bit compiler. Skip the
- duplicate so that we don't think it's installed twice.
-
- }
- */
- break;
- }
- }
- }
- }
-
- // Now just go looking for the executables, and accept any executable as the lowest version
- if (!installed) {
- for(int i = 0; compiler_info[i].compiler; ++i) {
- QString executable = QString(compiler_info[i].executable).toLower();
- if (executable.length() && !QStandardPaths::findExecutable(executable).isEmpty()) {
- if (detectedCompiler != compiler_info[i].compiler) {
- ++installed;
- detectedCompiler = compiler_info[i].compiler;
- }
- /* else {
-
- We detected the same compiler again, which happens when
- configure is build with the 64-bit compiler. Skip the
- duplicate so that we don't think it's installed twice.
-
- }
- */
- break;
- }
+ for (int i = 0; compiler_info[i].compiler; ++i) {
+ if (!QStandardPaths::findExecutable(compiler_info[i].executable).isEmpty()) {
+ if (detectedCompiler == CC_UNKNOWN)
+ detectedCompiler = compiler_info[i].compiler;
+ ++installed;
}
}
@@ -191,7 +129,6 @@ Compiler Environment::detectCompiler()
detectedCompiler = CC_UNKNOWN;
}
return detectedCompiler;
-#endif
};
/*!
diff --git a/tools/configure/environment.h b/tools/configure/environment.h
index 8415fa10a6..65ddc60eff 100644
--- a/tools/configure/environment.h
+++ b/tools/configure/environment.h
@@ -35,13 +35,7 @@ enum Compiler {
CC_UNKNOWN = 0,
CC_MINGW = 0x02,
CC_INTEL = 0x03,
- CC_MSVC2005 = 0x80,
- CC_MSVC2008 = 0x90,
- CC_MSVC2010 = 0xA0,
- CC_MSVC2012 = 0xB0,
- CC_MSVC2013 = 0xC0,
- CC_MSVC2015 = 0xD0,
- CC_MSVC2017 = 0xE0
+ CC_MSVC = 0x04
};
struct CompilerInfo;