Skip to content

Commit dfcbc5b

Browse files
committed
Fix CMake configuration for slick-shm dependency: allow installation, remove obsolete precompiled headers, and ensure proper handling in export targets
1 parent 023032c commit dfcbc5b

File tree

3 files changed

+9
-16
lines changed

3 files changed

+9
-16
lines changed

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
- All 22 tests pass (100% success rate)
1212
- No changes to public API - fully backward compatible at API level
1313
- Binary compatibility break: shared memory segments from previous versions are incompatible
14+
- Fixed CMake configuration to properly handle slick-shm dependency in export targets
15+
- Removed `SLICK_SHM_INSTALL OFF` to allow slick-shm installation when fetched
16+
- Added `find_dependency(slick-shm REQUIRED)` in slick-queueConfig.cmake.in
17+
- Removed obsolete platform-specific precompiled headers (windows.h, sys/mman.h, etc.)
1418

1519
# v1.2.3 - 2026-01-29
1620
- Initialize reserved counters for local and shared-memory queues

CMakeLists.txt

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@ find_package(slick-shm CONFIG QUIET)
1515
if (NOT slick-shm_FOUND)
1616
include(FetchContent)
1717

18-
# Disable slick-shm tests and examples
18+
# Disable slick-shm tests and examples, but allow installation
1919
set(SLICK_SHM_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
2020
set(SLICK_SHM_BUILD_TESTS OFF CACHE BOOL "" FORCE)
21-
set(SLICK_SHM_INSTALL OFF CACHE BOOL "" FORCE)
2221
FetchContent_Declare(
2322
slick-shm
2423
GIT_REPOSITORY https://github.com/SlickQuant/slick-shm.git
@@ -59,20 +58,6 @@ target_precompile_headers(slick-queue INTERFACE
5958
<new>
6059
)
6160

62-
if (WIN32)
63-
target_precompile_headers(slick-queue INTERFACE
64-
<windows.h>
65-
<tchar.h>
66-
)
67-
else()
68-
target_precompile_headers(slick-queue INTERFACE
69-
<sys/mman.h>
70-
<sys/stat.h>
71-
<fcntl.h>
72-
<unistd.h>
73-
<cerrno>
74-
)
75-
endif()
7661

7762
if(BUILD_SLICK_QUEUE_TESTS)
7863
enable_testing()

cmake/slick-queueConfig.cmake.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
@PACKAGE_INIT@
22

3+
# Find slick-shm dependency
4+
include(CMakeFindDependencyMacro)
5+
find_dependency(slick-shm REQUIRED)
6+
37
include("${CMAKE_CURRENT_LIST_DIR}/slick-queueTargets.cmake")
48

59
if(NOT TARGET slick::slick-queue AND TARGET slick::queue)

0 commit comments

Comments
 (0)