Skip to content

Commit 92ca918

Browse files
authored
Remove interface linking for PRIVATE linkage (#799)
1 parent 198f1fc commit 92ca918

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,11 @@ if(NOT SNMALLOC_HEADER_ONLY_LIBRARY)
509509
function(compile name TYPE ${ARGN})
510510
add_library(${name} ${TYPE} ${ARGN})
511511
target_link_libraries(${name} PRIVATE snmalloc)
512+
513+
# PRIVATE linking still touches INTERFACE level linking for unknown reasons.
514+
# Check https://github.com/microsoft/snmalloc/pull/799 for details.
515+
set_target_properties(${name} PROPERTIES INTERFACE_LINK_LIBRARIES "")
516+
512517
target_compile_definitions(${name} PRIVATE "SNMALLOC_USE_${SNMALLOC_CLEANUP}")
513518

514519
add_warning_flags(${name})

0 commit comments

Comments
 (0)