Set linker-language C; prevents linking c++ stdlib

Thanks to Alex Richardson for the suggestion
This commit is contained in:
Nathaniel Filardo
2019-11-14 15:40:05 +00:00
parent 528215e45e
commit 10475f3432

View File

@@ -142,6 +142,10 @@ if(NOT DEFINED SNMALLOC_ONLY_HEADER_LIBRARY)
if(EXPOSE_EXTERNAL_RESERVE)
target_compile_definitions(${name} PRIVATE -DSNMALLOC_EXPOSE_RESERVE)
endif()
# Ensure that we do not link against C++ stdlib when compiling shims.
set_target_properties(${name} PROPERTIES LINKER_LANGUAGE C)
endmacro()
if(NOT MSVC)