Commit Graph

17 Commits

Author SHA1 Message Date
Thiago Macieira
4d9fbb3345 Remove hard-coded MS compiler versions from the mkspecs
We're asking the compiler anyway, so we can fully use this information
just as well. Note that this actually happens after the spec itself has
been processed, so it was necessary to delay the version-specific flag
handling as well.

Change-Id: Ib57b52598e2f452985e9fffd14587b581d946022
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-12-23 13:45:26 +00:00
Oswald Buddenhagen
1b5271f27f determine compiler version at build time, not in configure
this makes it consistent with the determination of the default
include/library paths. this makes sense, as it's possible to switch the
sdk/toolchain after building qt (within reason).

a side effect of this change is that for compilers which emulate other
compilers, both the real and the emulated version are now made
available.

Change-Id: Icfcc672c0d2e3d1b5e622993c366063d70ad327c
Started-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-12-23 13:44:50 +00:00
Thiago Macieira
4242fe0a03 Silence cl.exe warning about -arch:SSE2 being unknown in 64-bit builds
That implies we need to differentiate between a variable set but empty
and an empty variable. GCC, Clang and the Intel compiler accept -msse2
on 64-bit builds without warning (they also accept -mno-sse2), but the
Microsoft compiler does not have that option.

Change-Id: I54233388ba10994996ae3e749fd829085e8fd7b7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-12-05 00:10:35 +00:00
Jan Arve Saether
b0ec05f27b Rename ANGLE libs in order to not conflict with other ANGLE libs
This is needed to be able to use Qt (with dynamic ANGLE) in a plugin
while the host runs a different version of Qt (and ANGLE).

In addition to changing the LIBEGL_NAME and LIBGLESV2_NAME variables
you also need to update the value of the LIBRARY definition in the
.def files for ANGLE:

    qtbase/src/3rdparty/angle/src/libGLESv2/libGLESv2[d?].def
    qtbase/src/3rdparty/angle/src/libGLESv2/libEGL[d?].def

Task-number: QTBUG-48431
Change-Id: Idd00d039ba3e20cc0ec7496bee36ed1c90383b0d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-12-01 12:28:02 +00:00
Maurice Kalinowski
7733a5fccc msvc: Introduce base config file for all targets
Visual Studio version specific changes have been added to msvc-
desktop.conf which is not used in WinRT or Windows Phone related builds.
Hence take a similar approach to gcc and introduce msvc-base to be used
by all configurations for common settings.

For WinRT this will only be applied to msvc2015 and later on to not
introduce any regressions or behavior changes for previous versions.

Change-Id: Ib1a4d539d46d788470c00cb5969fee74a803bd67
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-11-30 14:29:44 +00:00
Oswald Buddenhagen
f734599629 unify handling of library prefixes and extensions
make sure that all specs define QMAKE_{PREFIX,EXTENSION}_{SH,STATIC}LIB,
and adjust the code to make halfways consistent use of these variables,
in particular on windows; Win32MakefileGenerator::getLibTarget() is gone
as a result, as is QMAKE_CYGWIN_SHLIB. still, tons of hardcoded "lib"
references remain in the unix generator, because no-one cares.

Change-Id: I6ccf37cc562f6584221c94fa27b2834412e4e4ca
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-01 16:19:30 +00:00
Liang Qi
afab1546a7 Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
	qmake/doc/snippets/code/doc_src_qmake-manual.pro
	qmake/doc/src/qmake-manual.qdoc
	src/corelib/io/qstorageinfo_unix.cpp
	src/corelib/tools/qbytearray.cpp
	src/widgets/kernel/qwidgetwindow.cpp
	tests/auto/corelib/io/qprocess/tst_qprocess.cpp
	tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
	tests/auto/network/access/qnetworkreply/BLACKLIST

Change-Id: I9efcd7e1cce1c394eed425c43aa6fce7d2edf31c
2015-08-26 20:06:57 +02:00
Thiago Macieira
bedbcb2faf Use /Zc:throwingNew by default with MSVC 2015
As recommended by MS in
http://blogs.msdn.com/b/vcblog/archive/2015/08/06/new-in-vs-2015-zc-throwingnew.aspx

Change-Id: Id3d5c7bf4d4c45069621ffff13f80cecc1141353
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-08-10 20:22:01 +00:00
Frederik Gladhorn
77da617dc8 Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	doc/global/qt-cpp-defines.qdocconf
	src/3rdparty/forkfd/forkfd.c
	src/corelib/codecs/qtextcodec.cpp
	src/corelib/kernel/qmetatype.cpp
	src/corelib/tools/qset.qdoc
	src/gui/accessible/qaccessible.cpp
	src/gui/image/qpixmapcache.cpp
	src/opengl/qgl.cpp
	src/tools/qdoc/generator.cpp
	src/widgets/kernel/qwidget.cpp
	tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp

Change-Id: I4fbe1fa756a54c6843aa75f4ef70a1069ba7b085
2015-08-06 10:54:01 +02:00
Friedemann Kleint
d57c661115 MSVC2015: Disable warning C4577 ('noexcept' used with no exception handling mode specified).
Fix the flood of warnings:

src/corelib/global/qflags.h(52): warning C4577: 'noexcept' used with no exception handling mode specified; termination on exception is not guaranteed. Specify /EHsc

now occurring since we don't have exception handling enabled.

Change-Id: I05d12ee6303b4f9fceb48507fadfd7d1a5604ea4
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-08-02 22:35:46 +00:00
Thiago Macieira
6636320867 Makes sure that yacc works with the MSYS bison on Windows.
Most people's yacc are actually a symlink to bison. On Windows, where
symlinks don't usually exist, we can use bison -y.

This was tested with MSYS Bison.

Change-Id: I913745d48af30f9ef7b846b6438500261dd6022d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-07-20 16:09:07 +00:00
Debao Zhang
f624220b10 fix C4275 warnings for MSVC 2010 build
This issue had been fixed by SHA: a12a2fdf68
but re-introduced by SHA: c23d1c7695 again.

Task-number: QTBUG-45085
Change-Id: If98ee108335d80035179a83b1b28f384395d8373
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-03-28 02:34:06 +00:00
Kai Koehne
9ddfa43e02 MSVC: Remove use of -Zm argument
We've been setting the -Zm argument since the dawn of times (even before
the first git commit). Anyhow, MSDN from VS2008 onwards indicates
that this is not needed:

"In earlier versions of Visual C++, the compiler used several discrete
heaps, and each had a finite limit. Currently, the compiler dynamically
grows the heaps as necessary up to a total heap size limit, and requires a
fixed-size buffer only to construct precompiled headers. Consequently, the
/Zm compiler option is rarely necessary."

[ChangeLog][Compiler Specific Changes] Visual Studio: -Zm200 (an option to
specify the precompiled header memory allocation limit) is not added anymore
by qmake to the compiler calls. If you encounter an C1076 compiler error you
might need to re-add it in your .pro file.

Change-Id: Ia4bec7eba09d893a7d81886a1814602b9ce7563c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-02-13 21:23:19 +00:00
Allan Sandfeld Jensen
cc67960f8c Configure MSVC builds as C++11
QtWebEngine and QtWebKit uses the Qt config to detect if C++11
is enabled. Since it is always enabled on MSVC, we can safely
set the flag indicating it is a C++11 build when using a newer
MSVC version.

Change-Id: I2efb8d1a9b1cf1496481569403c00358d0cae365
Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-02-13 17:18:06 +00:00
Kai Koehne
0a76b6bc7f MSVC: Disable compiler warning 4996 for debug builds
Move compiler warning 4996 from level 3 to 4. This is needed to avoid
warnings about the use of C++ standard library functions like std::copy,
which is used e.g. in qvector.h (since c6752c5aa1):

'std::copy': Function call with parameters that may be unsafe -
this call relies on the caller to check that the passed values are
correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See
documentation on how to use Visual C++ 'Checked Iterators'

Because the warning has to be disabled before any standard C++ header
is included one cannot just fix this locally in qvector.h.

Change-Id: I929f1535656bca9f5beb7fd0d557178370c232c6
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-01-09 13:14:59 +01:00
Thiago Macieira
ce1c53b413 Add detection of and support for Visual Studio 2015
Tested with the Preview release of November 2014.

Differences to the 2013 detection and support:
 - Option -Zc:strictStrings is present in both debug and release mode
   and is passed to qmake's own build
 - New warnings 4456, 4457 and 4458 (shadowing) are disabled
 - Compiler supports -arch:AVX2

Change-Id: I9572ff4d4aded4004c1fa5d6f13ffee5462043d6
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2014-12-13 05:11:25 +01:00
Thiago Macieira
c23d1c7695 Create a common qmake configuration for all MSVC versions
Most files are exactly the same, so it's silly to duplicate this all
over. The differences could have been kept in each of the qmake.conf
files, but I preferred to centralize because they apply to each newer
version and, soon enough, version-specific configuration would grow
again.

Change-Id: I5c5ed58055c954acf4851d87c70cc5af49c98738
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2014-12-13 05:11:16 +01:00