Add switches for msvc-clang

The clang frontend for MSVC does not allow the same type of switches
that regular clang does, therefore we need logic to gate off msvc-clang.
This commit is contained in:
Vasily
2018-12-27 16:27:31 +01:00
parent f42c481308
commit 412e56fa11
+12 -1
View File
@@ -22,14 +22,25 @@ TEMPLATE = app
#QMAKE_CXXFLAGS += /W4
QMAKE_CXXFLAGS += /WX
#The MSVC frontend for clang does not understand /external
!*clang-msvc{
#external:anglebrackets suppresses warnings made in #includes
#made with angle brackets, like #include <iostream>, but will
#still report for includes done with quotes.
QMAKE_CXXFLAGS += /experimental:external /external:anglebrackets
}
}
*g++* {
QMAKE_CXXFLAGS += -Werror
}
*clang* {
#Look for anything clang that is not clang-msvc, since it does not
#allow all the same switches as regular clang.
*clang|*clang-g++|*clang-libc++ {
QMAKE_CXXFLAGS += -Werror
#All includes from the third-party directory will not warn.
QMAKE_CXXFLAGS += --system-header-prefix=third-party
}
SOURCES += src/main.cpp\