← Commit list

898ec9f2fb

Viktor Szakats
Viktor Szakats
2026-02-22
SUCCESS Duration: 331s

Subject

cmake: limit clang-tidy to the shared libcurl if static is also built

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/CMakeLists.txt+3 -0
@@ -167,6 +167,9 @@ if(BUILD_STATIC_LIBS)
set_target_properties(${LIB_STATIC} PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE)
endif()
endif()
+ if(CURL_CLANG_TIDY AND BUILD_SHARED_LIBS) # disable clang-tidy for static, and limit to the shared library, if both enabled
+ set_target_properties(${LIB_STATIC} PROPERTIES C_CLANG_TIDY "")
+ endif()
if(CURL_CODE_COVERAGE)
set_property(TARGET ${LIB_STATIC} APPEND PROPERTY COMPILE_DEFINITIONS ${CURL_COVERAGE_MACROS})
set_property(TARGET ${LIB_STATIC} APPEND PROPERTY COMPILE_OPTIONS ${CURL_COVERAGE_CFLAGS})