build: symplify clang tidy

This commit is contained in:
Carlos Gomes Martinho 2020-04-01 15:52:21 +02:00
parent 505c25aa9b
commit b58aca4432

View File

@ -49,7 +49,6 @@ if(LIBMBUS_RUN_CLANG_TIDY)
message(WARNING "clang-tidy not found.") message(WARNING "clang-tidy not found.")
else() else()
message(STATUS "clang-tidy found: ${CLANG_TIDY_EXE}") message(STATUS "clang-tidy found: ${CLANG_TIDY_EXE}")
set(DO_CLANG_TIDY "${CLANG_TIDY_EXE}")
endif() endif()
endif(LIBMBUS_RUN_CLANG_TIDY) endif(LIBMBUS_RUN_CLANG_TIDY)
@ -119,7 +118,7 @@ if(NOT MSVC)
endif() endif()
if(CLANG_TIDY_EXE) if(CLANG_TIDY_EXE)
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_CLANG_TIDY "${DO_CLANG_TIDY}") set_target_properties(${PROJECT_NAME} PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY_EXE}")
endif() endif()
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})