build: remove unused function get_test_target (#22176)

This commit is contained in:
dundargoc 2023-02-08 18:20:45 +01:00 committed by GitHub
parent d6d3a92013
commit eebed91d11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -859,25 +859,6 @@ elseif(CLANG_TSAN)
target_link_libraries(nvim PRIVATE -fsanitize=thread)
endif()
function(get_test_target prefix sfile relative_path_var target_var)
get_filename_component(full_d "${sfile}" DIRECTORY)
file(RELATIVE_PATH d "${PROJECT_SOURCE_DIR}/src/nvim" "${full_d}")
if(d MATCHES "^[.][.]")
file(RELATIVE_PATH d "${GENERATED_DIR}" "${full_d}")
endif()
get_filename_component(r "${sfile}" NAME)
if(NOT d MATCHES "^[.]?$")
set(r "${d}/${r}")
endif()
string(REGEX REPLACE "[/.]" "-" suffix "${r}")
set(${relative_path_var} ${r} PARENT_SCOPE)
if(prefix STREQUAL "")
set(${target_var} "${suffix}" PARENT_SCOPE)
else()
set(${target_var} "${prefix}-${suffix}" PARENT_SCOPE)
endif()
endfunction()
find_program(CLANG_TIDY_PRG clang-tidy)
set(EXCLUDE_CLANG_TIDY typval_encode.c.h ui_events.in.h)
if(WIN32)