Improve:compile speed.

This commit is contained in:
Fancy code 2024-03-12 21:55:44 +08:00
parent 5ba829db67
commit 6482585855
53 changed files with 100 additions and 52 deletions

45
CMakeLists.txt Executable file → Normal file
View File

@ -18,17 +18,46 @@ CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX14)
#
execute_process(
COMMAND git diff --name-only --diff-filter=ACMRT
OUTPUT_VARIABLE MODIFIED_FILES
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(ALL_MODEFIED_FILES "")
#
string(REPLACE "\n" ";" MODIFIED_FILES_LIST ${MODIFIED_FILES})
foreach(FILE ${MODIFIED_FILES_LIST})
# .cpp.h
get_filename_component(FILE_EXT ${FILE} EXT)
if(FILE_EXT MATCHES "\\.(c|cpp|h)$")
set(ALL_MODEFIED_FILES "${ALL_MODEFIED_FILES};${FILE}")
endif()
endforeach()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
# find the clang-tidy tools
unset(CLANG_TIDY_EXE CACHE)
unset(CLANG_TIDY_FIND CACHE)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
find_program(CLANG_TIDY_FIND NAMES clang-tidy PATHS ${LLVM_PATH}/build/bin)
find_program(CLANG_TIDY_FIND NAMES clang-tidy PATHS ${LLVM_PATH}/build/bin)
if(CLANG_TIDY_FIND)
message(STATUS "clang-tidy found: ${CLANG_TIDY_FIND}")
# set(CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_EXE}" "-header-filter=no.h -system-headers=no.h -checks=modernize-use-override")
set(CLANG_TIDY_EXE ${CLANG_TIDY_FIND} CACHE STRING INTERNAL)
message("CLANG_TIDY_EXE = ${CLANG_TIDY_EXE}")
add_custom_target(
check_modified_code
COMMAND ${CLANG_TIDY_EXE}
-checks='${CLANG_TIDY_CHECKS}'
--header-filter=.*
--system-headers=false
${ALL_MODEFIED_FILES}
-p ${PLATFORM_PATH}/cmake-shell
WORKING_DIRECTORY ${PLATFORM_PATH}
)
else()
# message(FATAL_ERROR "See ${CMAKE_SOURCE_DIR_IPCSDK}/doc.")
message(FATAL_ERROR "You set support clang-tidy, but clang-tidy not found.
@ -49,6 +78,15 @@ if ("${CLANG_FORMAT_SUPPORT}" MATCHES "true")
message(STATUS "clang-format found: ${CLANG_FORMAT_FIND}")
set(CLANG_FORMAT_EXE ${CLANG_FORMAT_FIND} CACHE STRING INTERNAL)
message("CLANG_FORMAT_EXE = ${CLANG_FORMAT_EXE}")
add_custom_target(
format_modified_code
COMMAND ${CLANG_FORMAT_EXE}
-style=file
-i ${ALL_MODEFIED_FILES}
WORKING_DIRECTORY ${PLATFORM_PATH}
)
else()
message(FATAL_ERROR "You set support clang-format, but clang-format not found.
Check path ${LLVM_PATH}/build/bin, weather clang-format exist.
@ -60,6 +98,11 @@ See:${IPC_SDK_PATH}/builde/global_config.cmake")
endif()
endif()
add_custom_target(
improve_modified_code
DEPENDS format_modified_code check_modified_code
)
if(${TARGET_PLATFORM} MATCHES ${DEFINE_LINUX})
# execute_process(COMMAND sh build_lvgl_for_cmakelist.sh ${TARGET_PLATFORM} ${CMAKE_SOURCE_DIR_IPCSDK} WORKING_DIRECTORY ${EXTERNAL_SOURCE_PATH}/lvglLinux-x86/)
# add_subdirectory(external/lvglLinux-x86)

View File

@ -30,7 +30,7 @@ if(${TEST_COVERAGE} MATCHES "true")
target_link_libraries(${TARGET_NAME} gcov)
endif()
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
HunttingCamera_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -19,8 +19,8 @@
#include "IMcuManager.h"
#include "IMissionManager.h"
#include "IStateMachine.h"
#include <thread>
#include <signal.h>
#include <thread>
static void sigHandler(int signo)
{
LogInfo("Stop main application.\n");

View File

@ -26,7 +26,7 @@ add_library(${TARGET_NAME} STATIC ${SRC_FILES})
target_link_libraries(${TARGET_NAME} McuAskBase StateMachine StatusCode Log)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
MissionManager_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -35,7 +35,7 @@ if(${TEST_COVERAGE} MATCHES "true")
target_link_libraries(${TARGET_NAME} gcov)
endif()
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
ipc_x86_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -54,6 +54,7 @@ set(CLANG_FORMAT_FILE "LLVM ${CMAKE_SOURCE_DIR_IPCSDK}/tools/clang-format/.clang
if(${LINUX_TEST} MATCHES "true")
set(CLANG_TIDY_SUPPORT "true")
set(CLANG_FORMAT_SUPPORT "true")
set(COMPILE_IMPROVE_SUPPORT "false") #
set(LLVM_PATH "$ENV{HOME}/llvm-project")
endif()
# ------------ build clang-tools end ------------ #

View File

@ -27,7 +27,7 @@ add_library(${IMPL_TARGET} STATIC ${IMPL_SRC_FILES})
target_link_libraries(${IMPL_TARGET} ${ABSTRACT_TARGET})
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
Hal_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -26,7 +26,7 @@ add_library(${TARGET_NAME} STATIC ${SRC_FILES})
target_link_libraries(${TARGET_NAME} WebServer Hal cjson-static StatusCode Log)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
AppManager_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -22,7 +22,7 @@ add_library(${TARGET_NAME} STATIC ${SRC_FILES})
target_link_libraries(${TARGET_NAME} LedControl Hal StatusCode Log)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
DeviceManager_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -28,7 +28,7 @@ add_library(${TARGET_NAME} STATIC ${SRC_FILES})
target_link_libraries(${TARGET_NAME} ConfigBase StatusCode Log)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
IpcConfig_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -31,7 +31,7 @@ add_library(${TARGET_NAME} STATIC ${SRC_FILES})
target_link_libraries(${TARGET_NAME} McuManager StatusCode Log)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
McuAskBase_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -28,7 +28,7 @@ add_library(${TARGET_NAME} STATIC ${SRC_FILES})
target_link_libraries(${TARGET_NAME} UartDevice McuAskBase McuProtocol StatusCode Log)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
McuManager_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -28,7 +28,7 @@ add_library(${TARGET_NAME} STATIC ${SRC_FILES})
target_link_libraries(${TARGET_NAME} StatusCode Log)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
MediaManager_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -23,7 +23,7 @@ add_library(${TARGET_NAME} STATIC ${SRC_FILES} ${SRC_FILES_OPENHARMONY})
target_link_libraries(${TARGET_NAME} Log)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
StateMachine_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -43,7 +43,7 @@ if(${TEST_COVERAGE} MATCHES "true")
target_link_libraries(${TARGET_NAME} gcov)
endif()
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
HunttingCameraTest_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -27,7 +27,7 @@ set(TEST_TOOL_TARGET MissionManagerTestTool)
add_library(${TEST_TOOL_TARGET} STATIC ${TEST_TOOL_SRC_FILES})
target_link_libraries(${TEST_TOOL_TARGET} MissionManager AppManagerTestTool Log)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
MissionManagerTestTool_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -28,7 +28,7 @@ if(${TEST_COVERAGE} MATCHES "true")
target_link_libraries(${TARGET_NAME} gcov)
endif()
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
HalTest_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -21,7 +21,7 @@ set(TEST_TOOL_TARGET HalTestTool)
add_library(${TEST_TOOL_TARGET} STATIC ${TEST_TOOL_SRC_FILES})
target_link_libraries(${TEST_TOOL_TARGET} KeyControl LedControl Log)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
HalTestTool_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -39,7 +39,7 @@ if(${TEST_COVERAGE} MATCHES "true")
target_link_libraries(${TARGET_NAME} gcov)
endif()
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
AppManagerTest_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -24,7 +24,7 @@ set(TEST_TOOL_TARGET AppManagerTestTool)
add_library(${TEST_TOOL_TARGET} STATIC ${TEST_TOOL_SRC_FILES})
target_link_libraries(${TEST_TOOL_TARGET} AppManager Servers Log)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
AppManagerTestTool_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -37,7 +37,7 @@ if(${TEST_COVERAGE} MATCHES "true")
target_link_libraries(${TARGET_NAME} gcov)
endif()
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
DeviceManagerTest_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -21,7 +21,7 @@ set(TEST_TOOL_TARGET DeviceManagerTestTool)
add_library(${TEST_TOOL_TARGET} STATIC ${TEST_TOOL_SRC_FILES})
target_link_libraries(${TEST_TOOL_TARGET} LedControl Log)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
DeviceManagerTestTool_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -31,7 +31,7 @@ target_link_libraries(${TARGET_NAME} IpcConfig gtest gmock pthread)
if(${TEST_COVERAGE} MATCHES "true")
target_link_libraries(${TARGET_NAME} gcov)
endif()
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
IpcConfigTest_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -28,7 +28,7 @@ set(TEST_TOOL_TARGET McuAskBaseTestTool)
add_library(${TEST_TOOL_TARGET} STATIC ${TEST_TOOL_SRC_FILES})
target_link_libraries(${TEST_TOOL_TARGET} UartDeviceTestTool Log)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
McuAskBaseTestTool_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -48,7 +48,7 @@ if(${TEST_COVERAGE} MATCHES "true")
target_link_libraries(${TARGET_NAME} gcov)
endif()
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
McuManagerTest_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -22,7 +22,7 @@ set(TEST_TOOL_TARGET McuManagerTestTool)
add_library(${TEST_TOOL_TARGET} STATIC ${TEST_TOOL_SRC_FILES})
target_link_libraries(${TEST_TOOL_TARGET} McuProtocolTestTool UartDeviceTestTool LinuxApiMock Log)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
McuManagerTestTool_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -26,7 +26,7 @@ target_link_libraries(${TARGET_NAME} ConfigBase gtest gmock pthread)
if(${TEST_COVERAGE} MATCHES "true")
target_link_libraries(${TARGET_NAME} gcov)
endif()
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
ConfigTest_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -24,7 +24,7 @@ target_link_libraries(${TARGET_NAME} FxHttpServer gtest gmock pthread Log)
if(${TEST_COVERAGE} MATCHES "true")
target_link_libraries(${TARGET_NAME} gcov)
endif()
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
FxHttpServerTest_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -21,7 +21,7 @@ set(TARGET_NAME LinuxApiMock)
add_library(${TARGET_NAME} STATIC ${SRC_FILES})
target_link_libraries(${TARGET_NAME} LinuxApi gtest gmock Log)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
LinuxApiMock_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -29,7 +29,7 @@ target_link_libraries(${TARGET_NAME} Log gtest gmock pthread)
if(${TEST_COVERAGE} MATCHES "true")
target_link_libraries(${TARGET_NAME} gcov)
endif()
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
LogTest_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -26,7 +26,7 @@ set(TEST_TOOL_TARGET McuProtocolTestTool)
add_library(${TEST_TOOL_TARGET} STATIC ${TEST_TOOL_SRC_FILES})
target_link_libraries(${TEST_TOOL_TARGET} UartDeviceTestTool Log)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
McuProtocolTestTool_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -28,7 +28,7 @@ target_link_libraries(${TARGET_NAME} SharedData gtest gmock pthread Log)
if(${TEST_COVERAGE} MATCHES "true")
target_link_libraries(${TARGET_NAME} gcov)
endif()
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
SharedDataTest_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -21,7 +21,7 @@ set(TARGET_NAME TestManager)
add_library(${TARGET_NAME} STATIC ${SRC_FILES})
target_link_libraries(${TARGET_NAME} LinuxApi gtest gmock Log)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
TestManager_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -34,7 +34,7 @@ endif()
if(${TARGET_PLATFORM} MATCHES ${DEFINE_LINUX})
target_link_libraries(${TARGET_NAME} LinuxApiMock)
endif()
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
UartDeviceTest_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -20,7 +20,7 @@ set(TEST_TOOL_TARGET UartDeviceTestTool)
add_library(${TEST_TOOL_TARGET} STATIC ${TEST_TOOL_SRC_FILES})
target_link_libraries(${TEST_TOOL_TARGET} LinuxApiMock Log)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
UartDeviceTestTool_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -24,7 +24,7 @@ target_link_libraries(${TARGET_NAME} WebServer gtest gmock pthread Log)
if(${TEST_COVERAGE} MATCHES "true")
target_link_libraries(${TARGET_NAME} gcov)
endif()
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
WebServerTest_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -22,7 +22,7 @@ set(TARGET_NAME ConfigBase)
add_library(${TARGET_NAME} STATIC ${SRC_FILES})
target_link_libraries(${TARGET_NAME} StatusCode Log libconfig.a)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
Config_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -25,7 +25,7 @@ set(TARGET_NAME FxHttpServer)
add_library(${TARGET_NAME} STATIC ${SRC_FILES})
target_link_libraries(${TARGET_NAME} StatusCode Log -Wl,--start-group httpsrv -Wl,--end-group)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
FxHttpServer_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -22,7 +22,7 @@ set(TARGET_NAME KeyControl)
add_library(${TARGET_NAME} STATIC ${SRC_FILES})
target_link_libraries(${TARGET_NAME} StatusCode Log)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
KeyControl_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -22,7 +22,7 @@ set(TARGET_NAME LedControl)
add_library(${TARGET_NAME} STATIC ${SRC_FILES})
target_link_libraries(${TARGET_NAME} StatusCode Log)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
LedControl_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -19,7 +19,7 @@ set(TARGET_NAME LinuxApi)
add_library(${TARGET_NAME} STATIC ${SRC_FILES})
target_link_libraries(${TARGET_NAME} Log)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
LinuxApi_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -27,7 +27,7 @@ add_library(${ABSTRACT_TARGET} STATIC ${ABSTRACT_SRC_FILES})
add_library(${IMPL_TARGET} STATIC ${IMPL_SRC_FILES} ${EASYLOGGING_SRC_FILES})
target_link_libraries(${IMPL_TARGET} ${ABSTRACT_TARGET})
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
Log_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -22,7 +22,7 @@ set(TARGET_NAME McuProtocol)
add_library(${TARGET_NAME} STATIC ${SRC_FILES})
target_link_libraries(${TARGET_NAME} ModBusCRC16 StatusCode Log)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
McuProtocol_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -22,7 +22,7 @@ set(TARGET_NAME MediaAdapter)
add_library(${TARGET_NAME} STATIC ${SRC_FILES})
target_link_libraries(${TARGET_NAME} StatusCode Log)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
MediaAdapter_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -21,7 +21,7 @@ set(TARGET_NAME ModBusCRC16)
add_library(${TARGET_NAME} STATIC ${SRC_FILES})
target_link_libraries(${TARGET_NAME} Log)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
ModBusCRC16_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -20,7 +20,7 @@ set(TARGET_NAME MultiProcess)
add_library(${TARGET_NAME} STATIC ${SRC_FILES})
target_link_libraries(${TARGET_NAME} StatusCode Log)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
MultiProcess_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -108,7 +108,7 @@ add_custom_command(
WORKING_DIRECTORY ${PROJECT_ROOT_PATH}/cmake-shell/
)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
Servers_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -21,7 +21,7 @@ set(TARGET_NAME SharedData)
add_library(${TARGET_NAME} STATIC ${SRC_FILES})
target_link_libraries(${TARGET_NAME} StatusCode Log LinuxApi)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
SharedData_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -20,7 +20,7 @@ set(TARGET_NAME StatusCode)
add_library(${TARGET_NAME} STATIC ${SRC_FILES})
target_link_libraries(${TARGET_NAME} Log)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
StatusCode_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -19,7 +19,7 @@ set(TARGET_NAME TcpModule)
add_library(${TARGET_NAME} STATIC ${SRC_FILES})
target_link_libraries(${TARGET_NAME} LinuxApi StatusCode Log)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
TcpModule_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -14,4 +14,8 @@
*/
#include "TcpModule.h"
#include "TcpModuleImpl.h"
void *CreateTcpServer(const TcpPram param) { return NewTcpServer(param); }
void *CreateTcpServer(const TcpPram param)
{
//
return NewTcpServer(param);
}

View File

@ -19,7 +19,7 @@ set(TARGET_NAME UartDevice)
add_library(${TARGET_NAME} STATIC ${SRC_FILES})
target_link_libraries(${TARGET_NAME} LinuxApi StatusCode Log)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
UartDevice_code_check
COMMAND ${CLANG_TIDY_EXE}

View File

@ -42,7 +42,7 @@ set(TARGET_NAME WebServer)
add_library(${TARGET_NAME} STATIC ${SRC_FILES})
target_link_libraries(${TARGET_NAME} StatusCode Log -Wl,--start-group libgo.a libmbedtls.a libgoahead-mbedtls.a -Wl,--end-group)
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
add_custom_target(
WebServer_code_check
COMMAND ${CLANG_TIDY_EXE}