diff --git a/tsl/CMakeLists.txt b/tsl/CMakeLists.txt index a76c015ea50..2d812829193 100644 --- a/tsl/CMakeLists.txt +++ b/tsl/CMakeLists.txt @@ -14,9 +14,8 @@ if(CC_PCLMUL) set(CMAKE_REQUIRED_FLAGS -mpclmul) endif() -# Detect if we have the needed instructions. -# Also refer to this link for the proper way of detecting i386: -# https://wiki.debian.org/X32Port +# Detect if we have the needed instructions. Also refer to this link for the +# proper way of detecting i386: https://wiki.debian.org/X32Port set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) check_c_source_compiles( " diff --git a/tsl/src/import/CMakeLists.txt b/tsl/src/import/CMakeLists.txt index d61b88e2506..b938decf792 100644 --- a/tsl/src/import/CMakeLists.txt +++ b/tsl/src/import/CMakeLists.txt @@ -4,9 +4,12 @@ if(USE_UMASH) list(APPEND SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/umash.c) endif() -# Disable clang-tidy for imported code -add_library(target_no_static_code_analysis OBJECT ${SOURCES}) -set_target_properties(target_no_static_code_analysis PROPERTIES C_CLANG_TIDY "") +if(SOURCES) + # Disable clang-tidy for imported code + add_library(target_no_static_code_analysis OBJECT ${SOURCES}) + set_target_properties(target_no_static_code_analysis PROPERTIES C_CLANG_TIDY + "") -target_link_libraries(${TSL_LIBRARY_NAME} - $) + target_link_libraries(${TSL_LIBRARY_NAME} + $) +endif()