mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-08 14:50:10 -06:00
clang-tidy: Do not require config file if not running clang-tidy
Since commit 00cfea965b (gitattributes: Do not export lint config files
in source archives, 2025-01-24, v4.0.0-rc1~129^2) the `.clang-tidy`
config file is not available in source archives. Require it only when
the `CMake_RUN_CLANG_TIDY` option is turned on, which we only do in
development and CI builds.
Fixes: #26712
This commit is contained in:
@@ -325,8 +325,8 @@ if(CMake_RUN_CLANG_TIDY)
|
||||
unset(clang_tidy_module_sha1)
|
||||
endif()
|
||||
|
||||
configure_file(.clang-tidy .clang-tidy COPYONLY)
|
||||
endif()
|
||||
configure_file(.clang-tidy .clang-tidy COPYONLY)
|
||||
|
||||
|
||||
option(CMake_RUN_IWYU "Run include-what-you-use with the compiler." OFF)
|
||||
|
||||
@@ -17,5 +17,7 @@ if(CMake_BUILD_WIX_CUSTOM_ACTION)
|
||||
add_subdirectory(Release/WiX)
|
||||
endif()
|
||||
|
||||
# Make sure generated files use the same clang-tidy checks (none).
|
||||
configure_file(.clang-tidy .clang-tidy COPYONLY)
|
||||
if(CMake_RUN_CLANG_TIDY)
|
||||
# Make sure generated files use the same clang-tidy checks (none).
|
||||
configure_file(.clang-tidy .clang-tidy COPYONLY)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user