Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
cmake: Terminate Clang-Tidy support
Browse files Browse the repository at this point in the history
This commit removes the dependencies of clang-tidy including configuration file
located in the parent directory.

Signed-off-by: Wei-Chia Su <[email protected]>
  • Loading branch information
Wei-Chia Su authored and leandro-arm committed Aug 9, 2024
1 parent 3c4305d commit 9837984
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 53 deletions.
2 changes: 0 additions & 2 deletions .clang-tidy

This file was deleted.

51 changes: 0 additions & 51 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -203,57 +203,6 @@ if(NOT DISABLE_CPPCHECK)
endif()
endif()

#
# Set up Clang-Tidy if it's available and enabled.
#
if(ENABLE_CLANG_TIDY)

find_program(
CMAKE_C_CLANG_TIDY
NAMES "clang-tidy"
"clang-tidy-3.6"
"clang-tidy-3.7"
"clang-tidy-3.8"
"clang-tidy-3.9"
"clang-tidy-4.0"
"clang-tidy-5.0"
"clang-tidy-6.0"
"clang-tidy-7"
"clang-tidy-8"
"clang-tidy-9"
"clang-tidy-10"
"clang-tidy-11")

if(NOT CMAKE_C_CLANG_TIDY)
unset(CMAKE_C_CLANG_TIDY CACHE)
endif()

if(CMAKE_C_CLANG_TIDY)
# cmake-format: off

if(CMAKE_C_COMPILER_TARGET)
list(APPEND CMAKE_C_CLANG_TIDY "--extra-arg=--target=${CMAKE_C_COMPILER_TARGET}")
endif()

foreach(dir IN LISTS CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES)
list(APPEND CMAKE_C_CLANG_TIDY "--extra-arg=-isystem")
list(APPEND CMAKE_C_CLANG_TIDY "--extra-arg=${dir}")
list(APPEND CMAKE_C_CLANG_TIDY "--extra-arg=-fms-extensions")
endforeach()

if(CMAKE_C_COMPILER_ID STREQUAL "ARMClang")
list(APPEND CMAKE_C_CLANG_TIDY "--extra-arg=-D__ARM_PROMISE=__builtin_assume")
list(APPEND CMAKE_C_CLANG_TIDY "--extra-arg=-D__ARMCC_VERSION=600000")
list(APPEND CMAKE_C_CLANG_TIDY "--extra-arg=-D__ESCAPE__(x)=(x)")
endif()

list(APPEND CMAKE_C_CLANG_TIDY "--quiet")

# cmake-format: on
endif()

endif()

#
# Try to locate Arm Compiler's 'fromelf' tool.
#
Expand Down

0 comments on commit 9837984

Please sign in to comment.