diff options
author | Cristian Adam <cristian.adam@qt.io> | 2021-09-30 17:51:56 +0200 |
---|---|---|
committer | Cristian Adam <cristian.adam@qt.io> | 2021-10-01 08:15:42 +0000 |
commit | b8609be93156f189b1a187c9018e4eae1985c375 (patch) | |
tree | 4d8e46f1042d8a48a709a73678d1cdc2929ff647 /cmake | |
parent | c75df591ed0884f08e9352d6d2c5d285a4b31300 (diff) |
CMake: Fix clang build type mismatch detection with Clang 13.0
Clang 13.0 has made CommonOptionsParser's constructor protected
and the test fails to build, and clang is considered as being
not found.
Change-Id: I7b28b5104bcb6541f3ee9c4bf56e9bb1898d58af
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/FindClang.cmake | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cmake/FindClang.cmake b/cmake/FindClang.cmake index 1ae02e38c8..41b7669f56 100644 --- a/cmake/FindClang.cmake +++ b/cmake/FindClang.cmake @@ -34,7 +34,13 @@ if (WIN32 AND TARGET clangTooling) llvm::cl::OptionCategory CheckToolCategory("check tool options"); int main(int argc, const char **argv) { - CommonOptionsParser OptionsParser(argc, argv, CheckToolCategory); + class Parser : public CommonOptionsParser { + public: + Parser(int &argc, const char **argv, llvm::cl::OptionCategory &Category) : + CommonOptionsParser(argc, argv, Category) {} + }; + + Parser OptionsParser(argc, argv, CheckToolCategory); ClangTool Tool(OptionsParser.getCompilations(), OptionsParser.getSourcePathList()); return 0; |