Skip to content

Commit e61f9f1

Browse files
committed
fix slick_queue header include
1 parent 2bcca0a commit e61f9f1

File tree

5 files changed

+33
-28
lines changed

5 files changed

+33
-28
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ add_subdirectory(tests)
6262
add_subdirectory(examples)
6363

6464
# Add benchmarks (optional)
65-
option(BUILD_SLICK_LOGGER_BENCHMARKS "Build performance benchmarks" OFF)
65+
option(BUILD_SLICK_LOGGER_BENCHMARKS "Build performance benchmarks" ON)
6666
if(BUILD_SLICK_LOGGER_BENCHMARKS AND CMAKE_BUILD_TYPE MATCHES Release)
6767
add_subdirectory(benchmarks)
6868
endif()

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,17 @@ A high-performance, cross-platform **header-only** logging library for C++20 usi
3030
### Option 1: Direct Copy
3131
For manual installation, you need both slick_logger and its dependency:
3232

33-
1. Copy the `include/slick_logger/` directory to your project
34-
2. Download `slick_queue.h` from https://raw.githubusercontent.com/SlickQuant/slick_queue/main/include/slick_queue/slick_queue.h
35-
3. Place `slick_queue.h` in your include path or alongside the slick_logger headers
33+
1. Copy the `include/slick/` directory to your project
34+
2. Download `queue.h` from https://raw.githubusercontent.com/SlickQuant/slick_queue/main/include/slick/queue.h
35+
3. Place `queue.h` in your include path or alongside the slick_logger headers
3636

3737
Your project structure should look like:
3838
```
3939
your_project/
4040
├── include/
41-
│ ├── slick_logger/
42-
│ │ └── logger.hpp
43-
│ └── slick/
44-
│ └── slick_queue.h
41+
│ ├── slick/
42+
│ └── logger.hpp
43+
│ └── queue.h
4544
└── src/
4645
└── main.cpp
4746
```

include/slick/logger.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
#include <utility>
4747
#include <vector>
4848
#include <string_view>
49-
#include <slick/slick_queue.h>
49+
#include <slick/queue.h>
5050

5151
// For time functions on some platforms
5252
#ifdef _WIN32

src/logger.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
#include <utility>
4545
#include <vector>
4646
#include <string_view>
47-
#include <slick/slick_queue.h>
47+
#include <slick/queue.h>
4848

4949
// For time functions on some platforms
5050
#ifdef _WIN32

tests/CMakeLists.txt

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,32 @@ option(BUILD_SLICK_LOGGER_TESTING "Build tests" ON)
44
if(BUILD_SLICK_LOGGER_TESTING)
55
find_package(GTest QUIET)
66

7-
if(GTest_FOUND)
8-
add_executable(slick_logger_tests test_logger.cpp)
9-
target_include_directories(slick_logger_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
10-
target_link_libraries(slick_logger_tests slick_logger GTest::gtest_main)
11-
add_test(NAME slick_logger_tests COMMAND slick_logger_tests)
7+
if(NOT GTest_FOUND)
8+
include(FetchContent)
9+
FetchContent_Declare(
10+
googletest
11+
URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip
12+
)
13+
# For Windows: Prevent overriding the parent project's compiler/linker settings
14+
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
15+
FetchContent_MakeAvailable(googletest)
16+
endif()
1217

13-
add_executable(slick_logger_sink_tests test_sinks.cpp)
14-
target_include_directories(slick_logger_sink_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
15-
target_link_libraries(slick_logger_sink_tests slick_logger GTest::gtest_main)
16-
add_test(NAME slick_logger_sink_tests COMMAND slick_logger_sink_tests)
18+
add_executable(slick_logger_tests test_logger.cpp)
19+
target_include_directories(slick_logger_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
20+
target_link_libraries(slick_logger_tests slick_logger GTest::gtest_main)
21+
add_test(NAME slick_logger_tests COMMAND slick_logger_tests)
1722

18-
add_executable(slick_logger_timestamp_tests test_timestamp.cpp)
19-
target_include_directories(slick_logger_timestamp_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
20-
target_link_libraries(slick_logger_timestamp_tests slick_logger GTest::gtest_main)
21-
add_test(NAME slick_logger_timestamp_tests COMMAND slick_logger_timestamp_tests)
22-
23-
message(STATUS "GTest found - building slick_logger tests")
24-
else()
25-
message(STATUS "GTest not found - skipping tests")
26-
endif()
23+
add_executable(slick_logger_sink_tests test_sinks.cpp)
24+
target_include_directories(slick_logger_sink_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
25+
target_link_libraries(slick_logger_sink_tests slick_logger GTest::gtest_main)
26+
add_test(NAME slick_logger_sink_tests COMMAND slick_logger_sink_tests)
27+
28+
add_executable(slick_logger_timestamp_tests test_timestamp.cpp)
29+
target_include_directories(slick_logger_timestamp_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
30+
target_link_libraries(slick_logger_timestamp_tests slick_logger GTest::gtest_main)
31+
add_test(NAME slick_logger_timestamp_tests COMMAND slick_logger_timestamp_tests)
32+
2733
else()
2834
message(STATUS "Testing disabled - skipping slick_logger tests")
2935
endif()

0 commit comments

Comments
 (0)