From 984b3242933fd3505053ca399d03174b453c6912 Mon Sep 17 00:00:00 2001 From: Alex Reinking Date: Mon, 16 Dec 2024 12:47:53 -0500 Subject: [PATCH] Don't analyze generated code in clang-tidy builds --- cmake/HalideGeneratorHelpers.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/HalideGeneratorHelpers.cmake b/cmake/HalideGeneratorHelpers.cmake index acd3a04f97cb..62aafef852fb 100644 --- a/cmake/HalideGeneratorHelpers.cmake +++ b/cmake/HalideGeneratorHelpers.cmake @@ -288,9 +288,9 @@ function(_Halide_library_from_generator TARGET) add_library("${TARGET}" STATIC ${local_out_${ARG_TYPE}}) set_property(TARGET "${TARGET}" PROPERTY POSITION_INDEPENDENT_CODE ON) set_property(TARGET "${TARGET}" PROPERTY LINKER_LANGUAGE CXX) - set_source_files_properties( - "${local_out_${ARG_TYPE}}" PROPERTIES SKIP_LINTING ON - ) + if (ARG_TYPE STREQUAL "c_source") + set_source_files_properties("${local_out_${ARG_TYPE}}" PROPERTIES SKIP_LINTING ON) + endif () if (NOT Halide_NO_DEFAULT_FLAGS) # Silence many useless warnings in generated C++ code compilation