Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,7 @@ if(${Backtrace_FOUND})
$<${ci_or_debug}:${Backtrace_INCLUDE_DIRS}>)
endif()

if(MSVC)
target_compile_definitions(snmalloc INTERFACE -D_HAS_EXCEPTIONS=0)
else()
if(NOT MSVC)
check_linker_flag(CXX "-rdynamic" SNMALLOC_LINKER_SUPPORT_RDYNAMIC)
if (SNMALLOC_LINKER_SUPPORT_RDYNAMIC)
# Get better stack traces in CI and debug builds.
Expand Down Expand Up @@ -429,6 +427,10 @@ if(NOT SNMALLOC_HEADER_ONLY_LIBRARY)
set_target_properties(${name} PROPERTIES CXX_VISIBILITY_PRESET hidden INTERPROCEDURAL_OPTIMIZATION ${SNMALLOC_COMPILER_SUPPORT_IPO})
target_compile_definitions(${name} PRIVATE "SNMALLOC_USE_${SNMALLOC_CLEANUP}")

if(MSVC)
target_compile_definitions(${name} INTERFACE -D_HAS_EXCEPTIONS=0)
endif()

add_warning_flags(${name})
if(NOT MSVC)
target_compile_definitions(${name} PRIVATE "SNMALLOC_EXPORT=__attribute__((visibility(\"default\")))")
Expand Down
Loading