summaryrefslogtreecommitdiffstats
path: root/Utilities
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-05-22 17:35:25 (GMT)
committerBrad King <brad.king@kitware.com>2023-05-22 21:16:12 (GMT)
commitfad150d314d11c3c0a8ff2619b1f872e2199fb41 (patch)
treeb4f9d24ced190279fffcd8e8d64eddf0afc6351e /Utilities
parentce3ec02bb285d551fbf98910cc8c86461501e328 (diff)
downloadCMake-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.txt10
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