From 8d23c5df52c40842a20f5a2d7a43ceefbc4d227b Mon Sep 17 00:00:00 2001 From: Khalil Estell Date: Sat, 7 Dec 2024 01:06:44 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20clang-tidy=20detection=20(?= =?UTF-8?q?#19)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * :memo: remove old disclaimer * :bug: Fix clang-tidy detection --- README.md | 6 ------ cmake/build.cmake | 20 +++++++++----------- conanfile.py | 2 +- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 93273ea..f87c197 100644 --- a/README.md +++ b/README.md @@ -267,9 +267,3 @@ See [`CONTRIBUTING.md`](CONTRIBUTING.md) for details. ## License Apache 2.0; see [`LICENSE`](LICENSE) for details. - -## Disclaimer - -This project is not an official Google project. It is not supported by -Google and Google specifically disclaims all warranties as to its quality, -merchantability, or fitness for a particular purpose. diff --git a/cmake/build.cmake b/cmake/build.cmake index 8a5ae93..3c4cd7a 100644 --- a/cmake/build.cmake +++ b/cmake/build.cmake @@ -40,15 +40,16 @@ if(WIN32) # Disable clang-tidy for Windows builds set(CMAKE_CXX_CLANG_TIDY "") else() - # Find clang-tidy-17 - find_program(LIBHAL_CLANG_TIDY_PROGRAM NAMES "clang-tidy-17" DOC - "Path to clang-tidy executable") + # Find clang-tidy "clang-tidy" + find_program(LIBHAL_CLANG_TIDY_PROGRAM + NAMES "clang-tidy" "clang-tidy-17" "clang-tidy-18" + 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} clang-tidy-17 AVAILABLE!") + message(STATUS "${LIBHAL_TITLE} clang-tidy AVAILABLE!") set(LIBHAL_CLANG_TIDY_CONFIG_FILE "${LIBHAL_SCRIPT_PATH}/clang-tidy.conf") set(LIBHAL_CLANG_TIDY "${LIBHAL_CLANG_TIDY_PROGRAM}" @@ -97,8 +98,7 @@ function(libhal_make_library) -Wall -Wextra -Wshadow - -fexceptions - -fno-rtti) + $<$:-fexceptions -fno-rtti>) target_link_libraries(${LIBRARY_ARGS_LIBRARY_NAME} PUBLIC ${LIBRARY_ARGS_LINK_LIBRARIES}) install(TARGETS ${LIBRARY_ARGS_LIBRARY_NAME}) @@ -269,8 +269,7 @@ function(libhal_build_demos) -Wall -Wextra -Wshadow - -fexceptions - -fno-rtti + $<$:-fexceptions -fno-rtti> ) target_link_libraries(startup_code PRIVATE picolibc @@ -294,8 +293,7 @@ function(libhal_build_demos) -Wall -Wextra -Wshadow - -fexceptions - -fno-rtti + $<$:-fexceptions -fno-rtti> ) target_link_libraries(${elf} PRIVATE startup_code @@ -316,4 +314,4 @@ function(libhal_build_demos) _libhal_add_clang_tidy_check(${elf}) endif() endforeach() -endfunction() \ No newline at end of file +endfunction() diff --git a/conanfile.py b/conanfile.py index 4f160cf..3ace967 100644 --- a/conanfile.py +++ b/conanfile.py @@ -23,7 +23,7 @@ class libhal_cmake_util_conan(ConanFile): name = "libhal-cmake-util" - version = "4.1.2" + version = "4.1.3" license = "Apache-2.0" homepage = "https://libhal.github.io/libhal-armcortex" description = ("A collection of CMake scripts for ARM Cortex ")