Add clang passing build

CircleCI Xenial does not come with an up to date version of Clang. It is
therefore required to get the newest version (8). The .pri file has
quickly been edited to be similar to the g++ version check.
This commit is contained in:
Vasily
2019-06-24 19:21:14 +02:00
committed by username223
parent aade86ed47
commit b65657b371
2 changed files with 73 additions and 3 deletions
+13
View File
@@ -1,3 +1,16 @@
# Makes sure the "clang++" command used to invoke the compilation is abvove version 8.
# If it's at or above version 7 then we can use the default clang++ otherwise we'll
# specifically need clang++-8.
CLANG_VERSION = $$system("clang++ -dumpversion")
!greaterThan(CLANG_VERSION, 7) {
message('clang++' version is not above 8. Manually using 'clang++-8'.)
!system(clang++-8 --version) {
error(At least clang++-8 required.)
}
#clang++-8 is needed for C++17 features. travis does not supply this by default.
QMAKE_CXX = clang++-8
}
include(clang-gcc-common-switches.pri)
QMAKE_CXXFLAGS += -Wmost