Skip to content

🔥 Remove clang-tidy again #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions cmake/build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,40 +36,6 @@ add_custom_target(copy_compile_commands ALL
# Colored LIBHAL text
set(LIBHAL_TITLE "${BoldMagenta}[LIBHAL]:${ColourReset}")

if(WIN32)
# Disable clang-tidy for Windows builds
set(CMAKE_CXX_CLANG_TIDY "")
else()
# Find clang-tidy "clang-tidy"
find_program(LIBHAL_CLANG_TIDY_PROGRAM
NAMES "clang-tidy-18" "clang-tidy-17" "clang-tidy"
DOC "Path to clang-tidy executable")

if(NOT LIBHAL_CLANG_TIDY_PROGRAM)
message(STATUS "${LIBHAL_TITLE} clang-tidy not found.")
else()
# Set clang-tidy as a CXX language standard option
message(STATUS "${LIBHAL_TITLE} ${LIBHAL_CLANG_TIDY_PROGRAM} AVAILABLE!")
set(LIBHAL_CLANG_TIDY_CONFIG_FILE
"${LIBHAL_SCRIPT_PATH}/clang-tidy.conf")
set(LIBHAL_CLANG_TIDY "${LIBHAL_CLANG_TIDY_PROGRAM}"
"--config-file=${LIBHAL_CLANG_TIDY_CONFIG_FILE}")
endif()
endif()

# Adds clang tidy check to target for host builds (skipped if a cross build)
function(_libhal_add_clang_tidy_check TARGET)
if(${CMAKE_CROSSCOMPILING})
message(STATUS "${LIBHAL_TITLE} Cross compiling, skipping clang-tidy checks for \"${TARGET}\"")
elseif(WIN32)
message(STATUS "${LIBHAL_TITLE} Windows has issues with clang-tidy, skipping clang-tidy checks for \"${TARGET}\"")
else()
set(CMAKE_CXX_CLANG_TIDY ${LIBHAL_CLANG_TIDY_PROGRAM})
set_target_properties(${TARGET} PROPERTIES CXX_CLANG_TIDY
"${LIBHAL_CLANG_TIDY}")
endif()
endfunction()

function(libhal_make_library)
# Parse CMake function arguments
set(options USE_CLANG_TIDY)
Expand Down
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

class libhal_cmake_util_conan(ConanFile):
name = "libhal-cmake-util"
version = "4.2.0"
version = "4.3.0"
license = "Apache-2.0"
homepage = "https://libhal.github.io/libhal-armcortex"
description = ("A collection of CMake scripts for ARM Cortex ")
Expand Down