Skip to content

Commit 19d8615

Browse files
author
AstroAir
committed
Save local changes before pulling from dev branch
- Modified search module files (cache.hpp, lru.hpp, mysql.cpp/hpp, search.cpp/hpp, sqlite.hpp, ttl.hpp) - Added new test files and improvements across multiple modules - Enhanced ASIO, Beast, and other components with new features
1 parent b36650e commit 19d8615

708 files changed

Lines changed: 162121 additions & 12299 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,11 @@ if(ATOM_BUILD_TESTS)
212212
add_subdirectory(tests)
213213
endif()
214214

215+
# Add secret module test if secret module is enabled
216+
if(ATOM_BUILD_SECRET)
217+
include(test_secret_CMakeLists.txt)
218+
endif()
219+
215220
# -----------------------------------------------------------------------------
216221
# Documentation
217222
# -----------------------------------------------------------------------------

atom/containers/CMakeLists.txt

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# CMakeLists.txt for Atom-Containers
2+
# This project is licensed under the terms of the GPL3 license.
3+
#
4+
# Project Name: Atom-Containers
5+
# Description: High-performance container library for Atom
6+
# Author: Max Qian
7+
# License: GPL3
8+
9+
cmake_minimum_required(VERSION 3.20)
10+
project(
11+
atom-containers
12+
VERSION 1.0.0
13+
LANGUAGES CXX)
14+
15+
# Headers
16+
set(HEADERS
17+
boost_containers.hpp
18+
graph.hpp
19+
high_performance.hpp
20+
intrusive.hpp
21+
lockfree.hpp)
22+
23+
# Build Interface Library (header-only)
24+
add_library(${PROJECT_NAME} INTERFACE)
25+
26+
# Include directories
27+
target_include_directories(${PROJECT_NAME} INTERFACE
28+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
29+
$<INSTALL_INTERFACE:include>
30+
)
31+
32+
# Set C++ standard
33+
target_compile_features(${PROJECT_NAME} INTERFACE cxx_std_17)
34+
35+
# Installation
36+
install(TARGETS ${PROJECT_NAME}
37+
EXPORT ${PROJECT_NAME}Targets
38+
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
39+
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
40+
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
41+
)
42+
43+
# Install headers
44+
install(FILES ${HEADERS}
45+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/atom/containers
46+
)
47+
48+
# Export targets
49+
install(EXPORT ${PROJECT_NAME}Targets
50+
FILE ${PROJECT_NAME}Targets.cmake
51+
NAMESPACE atom::containers::
52+
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
53+
)
54+
55+
# Register this module as an Atom module
56+
set_property(GLOBAL APPEND PROPERTY ATOM_MODULE_TARGETS ${PROJECT_NAME})

atom/error/CMakeLists.txt

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,67 @@ set(SOURCES exception.cpp stacktrace.cpp)
1616
# Headers
1717
set(HEADERS error_code.hpp stacktrace.hpp)
1818

19+
# Test and example sources
20+
set(TEST_SOURCES test_stacktrace.cpp)
21+
set(BENCHMARK_SOURCES benchmark_stacktrace.cpp)
22+
set(EXAMPLE_SOURCES example_stacktrace.cpp)
23+
1924
# Dependencies
2025
set(LIBS loguru)
2126

27+
# Add meta module dependency for DemangleHelper
28+
if(TARGET atom-meta)
29+
list(APPEND LIBS atom-meta)
30+
endif()
31+
32+
# Optional atom module dependencies for stacktrace compression/decompression
33+
# These are only needed if ATOM_ENABLE_STACKTRACE_COMPRESSION is defined
34+
if(ATOM_ENABLE_STACKTRACE_COMPRESSION)
35+
if(TARGET atom-algorithm)
36+
list(APPEND LIBS atom-algorithm)
37+
endif()
38+
39+
if(TARGET atom-io)
40+
list(APPEND LIBS atom-io)
41+
endif()
42+
43+
if(TARGET atom-containers)
44+
list(APPEND LIBS atom-containers)
45+
endif()
46+
47+
add_compile_definitions(ATOM_ENABLE_STACKTRACE_COMPRESSION)
48+
endif()
49+
2250
if(LINUX)
2351
list(APPEND LIBS dl)
2452
endif()
2553

54+
# Platform-specific libraries for enhanced stacktrace
55+
if(WIN32)
56+
list(APPEND LIBS dbghelp psapi)
57+
elseif(UNIX AND NOT APPLE)
58+
list(APPEND LIBS dl)
59+
elseif(APPLE)
60+
list(APPEND LIBS dl)
61+
endif()
62+
63+
# Optional dependencies
64+
find_package(Boost QUIET COMPONENTS stacktrace)
65+
if(Boost_FOUND)
66+
add_compile_definitions(ATOM_USE_BOOST)
67+
list(APPEND LIBS Boost::stacktrace)
68+
message(STATUS "Boost found - enabling Boost stacktrace support")
69+
endif()
70+
71+
# Note: Using existing atom::io compression component instead of direct zlib
72+
73+
# Google Test for unit testing
74+
find_package(GTest QUIET)
75+
if(GTest_FOUND)
76+
enable_testing()
77+
message(STATUS "Google Test found - enabling unit tests")
78+
endif()
79+
2680
# Build Object Library
2781
add_library(${PROJECT_NAME}_object OBJECT ${SOURCES} ${HEADERS})
2882
set_property(TARGET ${PROJECT_NAME}_object PROPERTY POSITION_INDEPENDENT_CODE 1)
@@ -40,5 +94,46 @@ set_target_properties(
4094
SOVERSION ${PROJECT_VERSION_MAJOR}
4195
OUTPUT_NAME ${PROJECT_NAME})
4296

97+
# Integration test executable
98+
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/test_integration.cpp)
99+
add_executable(stacktrace_integration_test test_integration.cpp)
100+
target_link_libraries(stacktrace_integration_test PRIVATE ${PROJECT_NAME})
101+
message(STATUS "Building stacktrace integration test")
102+
endif()
103+
104+
# Example executable
105+
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/example_stacktrace.cpp)
106+
add_executable(stacktrace_example ${EXAMPLE_SOURCES})
107+
target_link_libraries(stacktrace_example PRIVATE ${PROJECT_NAME})
108+
message(STATUS "Building stacktrace example")
109+
endif()
110+
111+
# Benchmark executable
112+
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/benchmark_stacktrace.cpp)
113+
add_executable(stacktrace_benchmark ${BENCHMARK_SOURCES})
114+
target_link_libraries(stacktrace_benchmark PRIVATE ${PROJECT_NAME})
115+
message(STATUS "Building stacktrace benchmark")
116+
endif()
117+
118+
# Unit tests (if Google Test is available)
119+
if(GTest_FOUND AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/test_stacktrace.cpp)
120+
add_executable(stacktrace_tests ${TEST_SOURCES})
121+
target_link_libraries(stacktrace_tests PRIVATE ${PROJECT_NAME} GTest::gtest GTest::gtest_main)
122+
123+
# Add test to CTest
124+
add_test(NAME StackTraceUnitTests COMMAND stacktrace_tests)
125+
set_tests_properties(StackTraceUnitTests PROPERTIES TIMEOUT 300 LABELS "unit;stacktrace")
126+
message(STATUS "Building stacktrace unit tests")
127+
endif()
128+
129+
# Performance test target
130+
if(TARGET stacktrace_benchmark)
131+
add_custom_target(perf_test
132+
COMMAND stacktrace_benchmark
133+
DEPENDS stacktrace_benchmark
134+
COMMENT "Running stacktrace performance benchmarks"
135+
)
136+
endif()
137+
43138
# Install rules
44139
install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})

0 commit comments

Comments
 (0)