修改项目结构以便于扩展,引入clang-format格式化

This commit is contained in:
2024-09-18 14:48:55 +08:00
parent 96a417ba93
commit e39dcdcde9
19 changed files with 676 additions and 379 deletions

View File

@@ -1,9 +1,5 @@
cmake_minimum_required( VERSION 3.28)
project(Logging)
aux_source_directory(${CMAKE_SOURCE_DIR}/src SRC)
set(LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
set(ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
@@ -11,15 +7,11 @@ set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin)
include_directories(${CMAKE_SOURCE_DIR}/include)
if (SHARED)
add_library(${PROJECT_NAME} SHARED ${SRC})
else()
add_library(${PROJECT_NAME} ${SRC})
endif()
#编译库文件
add_subdirectory(src)
#测试单元
if (SKIPTEST)
else()
add_executable(test_simple ${CMAKE_SOURCE_DIR}/test_package/test_simple.c ${SRC})
add_executable(test_interceptor ${CMAKE_SOURCE_DIR}/test_package/test_interceptor.c ${SRC})
add_subdirectory(tests)
endif()