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>
This commit is contained in:
parent
979e0512ac
commit
0a76b6bc7f
@ -41,7 +41,7 @@ QMAKE_CFLAGS_SSE4_2 = -arch:SSE2
|
||||
|
||||
QMAKE_CXX = $$QMAKE_CC
|
||||
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
|
||||
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189
|
||||
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189 -w44996
|
||||
QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
|
||||
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
|
||||
QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
|
||||
|
Loading…
Reference in New Issue
Block a user