Skip to content

Commit 8d23c5d

Browse files
authored
🐛 Fix clang-tidy detection (#19)
* 📝 remove old disclaimer * 🐛 Fix clang-tidy detection
1 parent 3c957ad commit 8d23c5d

File tree

3 files changed

+10
-18
lines changed

3 files changed

+10
-18
lines changed

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,3 @@ See [`CONTRIBUTING.md`](CONTRIBUTING.md) for details.
267267
## License
268268

269269
Apache 2.0; see [`LICENSE`](LICENSE) for details.
270-
271-
## Disclaimer
272-
273-
This project is not an official Google project. It is not supported by
274-
Google and Google specifically disclaims all warranties as to its quality,
275-
merchantability, or fitness for a particular purpose.

cmake/build.cmake

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,16 @@ if(WIN32)
4040
# Disable clang-tidy for Windows builds
4141
set(CMAKE_CXX_CLANG_TIDY "")
4242
else()
43-
# Find clang-tidy-17
44-
find_program(LIBHAL_CLANG_TIDY_PROGRAM NAMES "clang-tidy-17" DOC
45-
"Path to clang-tidy executable")
43+
# Find clang-tidy "clang-tidy"
44+
find_program(LIBHAL_CLANG_TIDY_PROGRAM
45+
NAMES "clang-tidy" "clang-tidy-17" "clang-tidy-18"
46+
DOC "Path to clang-tidy executable")
4647

4748
if(NOT LIBHAL_CLANG_TIDY_PROGRAM)
4849
message(STATUS "${LIBHAL_TITLE} clang-tidy not found.")
4950
else()
5051
# Set clang-tidy as a CXX language standard option
51-
message(STATUS "${LIBHAL_TITLE} clang-tidy-17 AVAILABLE!")
52+
message(STATUS "${LIBHAL_TITLE} clang-tidy AVAILABLE!")
5253
set(LIBHAL_CLANG_TIDY_CONFIG_FILE
5354
"${LIBHAL_SCRIPT_PATH}/clang-tidy.conf")
5455
set(LIBHAL_CLANG_TIDY "${LIBHAL_CLANG_TIDY_PROGRAM}"
@@ -97,8 +98,7 @@ function(libhal_make_library)
9798
-Wall
9899
-Wextra
99100
-Wshadow
100-
-fexceptions
101-
-fno-rtti)
101+
$<$<COMPILE_LANGUAGE:CXX>:-fexceptions -fno-rtti>)
102102
target_link_libraries(${LIBRARY_ARGS_LIBRARY_NAME} PUBLIC
103103
${LIBRARY_ARGS_LINK_LIBRARIES})
104104
install(TARGETS ${LIBRARY_ARGS_LIBRARY_NAME})
@@ -269,8 +269,7 @@ function(libhal_build_demos)
269269
-Wall
270270
-Wextra
271271
-Wshadow
272-
-fexceptions
273-
-fno-rtti
272+
$<$<COMPILE_LANGUAGE:CXX>:-fexceptions -fno-rtti>
274273
)
275274
target_link_libraries(startup_code PRIVATE
276275
picolibc
@@ -294,8 +293,7 @@ function(libhal_build_demos)
294293
-Wall
295294
-Wextra
296295
-Wshadow
297-
-fexceptions
298-
-fno-rtti
296+
$<$<COMPILE_LANGUAGE:CXX>:-fexceptions -fno-rtti>
299297
)
300298
target_link_libraries(${elf} PRIVATE
301299
startup_code
@@ -316,4 +314,4 @@ function(libhal_build_demos)
316314
_libhal_add_clang_tidy_check(${elf})
317315
endif()
318316
endforeach()
319-
endfunction()
317+
endfunction()

conanfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
class libhal_cmake_util_conan(ConanFile):
2525
name = "libhal-cmake-util"
26-
version = "4.1.2"
26+
version = "4.1.3"
2727
license = "Apache-2.0"
2828
homepage = "https://libhal.github.io/libhal-armcortex"
2929
description = ("A collection of CMake scripts for ARM Cortex ")

0 commit comments

Comments
 (0)