headersclean: Check for all-W3 MSVC warnings
C4180, C4458 were disabled already in 2012, in commit6668f5becf
. C4577 was disabled due to QtScript being compiled without exception support in commit97d7d80e73
. Anyhow, Qt Script is now officially gone in Qt 6, and Qt headers do work just fine with C4180. Finally, C4458 is nowadays a W4 warning, so not enabled in the first place. Task-number: QTBUG-82615 Change-Id: I2f9b8e858817876b069a166129fbfac7ef3587a0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
parent
b5f972361a
commit
146421ecaf
@ -99,14 +99,9 @@ function(qt_internal_add_headers_clean_target
|
|||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||||
# 4180: qualifier applied to function type has no meaning; ignored
|
|
||||||
# 4458: declaration of 'identifier' hides class member
|
|
||||||
# 4577: 'noexcept' used with no exception handling mode specified; termination on
|
|
||||||
# exception is not guaranteed. Specify /EHsc
|
|
||||||
#
|
|
||||||
# -Za would enable strict standards behavior, but we can't add it because
|
# -Za would enable strict standards behavior, but we can't add it because
|
||||||
# <windows.h> and <GL.h> violate the standards.
|
# <windows.h> and <GL.h> violate the standards.
|
||||||
set(hcleanFLAGS -std:c++17 -WX -W3 -wd4180 -wd4458 -wd4577)
|
set(hcleanFLAGS -std:c++17 -WX -W3)
|
||||||
|
|
||||||
# cl.exe needs a source path
|
# cl.exe needs a source path
|
||||||
get_filename_component(source_path "${QT_MKSPECS_DIR}/features/data/dummy.cpp" REALPATH)
|
get_filename_component(source_path "${QT_MKSPECS_DIR}/features/data/dummy.cpp" REALPATH)
|
||||||
|
@ -273,15 +273,9 @@ headersclean:!internal_module {
|
|||||||
|
|
||||||
hcleanCOMMAND = $(CXX) -c $(CXXFLAGS) $$hcleanFLAGS $(INCPATH) $$hcleanDEFS -xc++ ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
|
hcleanCOMMAND = $(CXX) -c $(CXXFLAGS) $$hcleanFLAGS $(INCPATH) $$hcleanDEFS -xc++ ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
|
||||||
} else: msvc:!intel_icl {
|
} else: msvc:!intel_icl {
|
||||||
# 4180: qualifier applied to function type has no meaning; ignored
|
|
||||||
# 4458: declaration of 'identifier' hides class member
|
|
||||||
# -Za enables strict standards behavior, but we can't add it because
|
# -Za enables strict standards behavior, but we can't add it because
|
||||||
# <windows.h> and <GL.h> violate the standards.
|
# <windows.h> and <GL.h> violate the standards.
|
||||||
hcleanFLAGS = -WX -W3 -wd4180 -wd4458
|
hcleanFLAGS = -WX -W3
|
||||||
|
|
||||||
# MSVC 2015 (compiler version 19.0):
|
|
||||||
# 4577: 'noexcept' used with no exception handling mode specified; termination on exception is not guaranteed. Specify /EHsc
|
|
||||||
greaterThan(QMAKE_MSC_VER, 18): hcleanFLAGS += -wd4577
|
|
||||||
|
|
||||||
hcleanCOMMAND = $(CXX) -c $(CXXFLAGS) $$hcleanFLAGS $(INCPATH) $$hcleanDEFS -FI${QMAKE_FILE_IN} -Fo${QMAKE_FILE_OUT} \
|
hcleanCOMMAND = $(CXX) -c $(CXXFLAGS) $$hcleanFLAGS $(INCPATH) $$hcleanDEFS -FI${QMAKE_FILE_IN} -Fo${QMAKE_FILE_OUT} \
|
||||||
$$[QT_INSTALL_DATA/src]/mkspecs/features/data/dummy.cpp
|
$$[QT_INSTALL_DATA/src]/mkspecs/features/data/dummy.cpp
|
||||||
|
Loading…
Reference in New Issue
Block a user