From 412e56fa1154222b3b536f90171bf6d708f3cb1b Mon Sep 17 00:00:00 2001 From: Vasily Date: Thu, 27 Dec 2018 16:27:31 +0100 Subject: [PATCH] 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. --- advancedSettings.pro | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/advancedSettings.pro b/advancedSettings.pro index 6cbf415..497199d 100644 --- a/advancedSettings.pro +++ b/advancedSettings.pro @@ -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 , 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\