From 2124522f2f67436bad5af12b268a502327dbec94 Mon Sep 17 00:00:00 2001 From: Matthew Parkinson Date: Fri, 17 Oct 2025 14:14:41 +0100 Subject: [PATCH] CMAKE: Libs should not require headers The API exposed by the various libraries in snmalloc all obey standard C std lib conventions, so no headers are required to consume them. This change updates the CMake configuration to not require headers for the libraries. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a401fabc..aea61c4af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -508,7 +508,7 @@ if(NOT SNMALLOC_HEADER_ONLY_LIBRARY) function(compile name TYPE ${ARGN}) add_library(${name} ${TYPE} ${ARGN}) - target_link_libraries(${name} snmalloc) + target_link_libraries(${name} PRIVATE snmalloc) target_compile_definitions(${name} PRIVATE "SNMALLOC_USE_${SNMALLOC_CLEANUP}") add_warning_flags(${name})