Skip to content

Commit

Permalink
重构 CMake 配置,新增库创建函数,删除不再使用的脚本文件,优化 Python 接口功能,增强多线程执行和性能分析支持
Browse files Browse the repository at this point in the history
  • Loading branch information
AstroAir committed Nov 20, 2024
1 parent 73bb3ae commit 522ebc0
Show file tree
Hide file tree
Showing 10 changed files with 506 additions and 568 deletions.
Empty file removed pysrc/target/__init__.py
Empty file.
66 changes: 66 additions & 0 deletions src/script/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# CMakeLists.txt for Lithium-Task
# This project is licensed under the terms of the GPL3 license.
#
# Project Name: Lithium-Task
# Description: The official config module for lithium server
# Author: Max Qian
# License: GPL3

cmake_minimum_required(VERSION 3.20)
project(lithium-task VERSION 1.0.0 LANGUAGES C CXX)

# Include subdirectories
add_subdirectory(simple)

# Sources and Headers
set(PROJECT_SOURCES
container.cpp
generator.cpp
loader.cpp
manager.cpp
singlepool.cpp
task.cpp
)

set(PROJECT_HEADERS
container.hpp
generator.hpp
loader.hpp
manager.hpp
singlepool.hpp
task.hpp
)

# Required libraries
set(PROJECT_LIBS
atom-component
atom-function
atom-utils
atom-error
loguru
${CMAKE_THREAD_LIBS_INIT}
)

# Function to create a library target
function(create_library TARGET_NAME)
add_library(${TARGET_NAME} STATIC ${ARGN})
target_include_directories(${TARGET_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(${TARGET_NAME} PRIVATE ${PROJECT_LIBS})
set_target_properties(${TARGET_NAME} PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION 1
OUTPUT_NAME ${TARGET_NAME}
)
endfunction()

# Create Object Library
add_library(${PROJECT_NAME}_OBJECT OBJECT ${PROJECT_SOURCES} ${PROJECT_HEADERS})
set_property(TARGET ${PROJECT_NAME}_OBJECT PROPERTY POSITION_INDEPENDENT_CODE ON)

# Create Static Library
create_library(${PROJECT_NAME} $<TARGET_OBJECTS:${PROJECT_NAME}_OBJECT>)

# Install target
install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
189 changes: 0 additions & 189 deletions src/script/custom/hotspot.ps1

This file was deleted.

128 changes: 0 additions & 128 deletions src/script/custom/hotspot.sh

This file was deleted.

Loading

0 comments on commit 522ebc0

Please sign in to comment.