diff options
author | Brad King <brad.king@kitware.com> | 2023-05-22 17:35:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-05-22 21:16:12 (GMT) |
commit | fad150d314d11c3c0a8ff2619b1f872e2199fb41 (patch) | |
tree | b4f9d24ced190279fffcd8e8d64eddf0afc6351e /Utilities | |
parent | ce3ec02bb285d551fbf98910cc8c86461501e328 (diff) | |
download | CMake-fad150d314d11c3c0a8ff2619b1f872e2199fb41.zip CMake-fad150d314d11c3c0a8ff2619b1f872e2199fb41.tar.gz CMake-fad150d314d11c3c0a8ff2619b1f872e2199fb41.tar.bz2 |
clang-tidy module: Update to build against LLVM/Clang 16
Diffstat (limited to 'Utilities')
-rw-r--r-- | Utilities/ClangTidyModule/CMakeLists.txt | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Utilities/ClangTidyModule/CMakeLists.txt b/Utilities/ClangTidyModule/CMakeLists.txt index 97c176f..582d54a 100644 --- a/Utilities/ClangTidyModule/CMakeLists.txt +++ b/Utilities/ClangTidyModule/CMakeLists.txt @@ -6,11 +6,15 @@ project(CMakeClangTidyModule C CXX) get_filename_component(tmp "${CMAKE_CURRENT_SOURCE_DIR}" PATH) get_filename_component(CMake_SOURCE_DIR "${tmp}" PATH) -set(CMAKE_CXX_STANDARD 14) -set(CMAKE_CXX_STANDARD_REQUIRED ON) - find_package(Clang REQUIRED) +if(LLVM_VERSION_MAJOR GREATER_EQUAL 16) + set(CMAKE_CXX_STANDARD 17) +else() + set(CMAKE_CXX_STANDARD 14) +endif() +set(CMAKE_CXX_STANDARD_REQUIRED ON) + add_library(cmake-clang-tidy-module MODULE Module.cxx |