mirror of
https://github.com/microsoft/mimalloc.git
synced 2024-12-25 20:14:12 +08:00
rename library check to find_link_library
This commit is contained in:
parent
f739e4f2c3
commit
9cd7e4cc68
@ -343,7 +343,7 @@ endif()
|
||||
|
||||
# we prefer -l<lib> test over `find_library` as sometimes core libraries
|
||||
# like `libatomic` are not on the system path (see issue #898)
|
||||
function(add_link_library libname outlibname)
|
||||
function(find_link_library libname outlibname)
|
||||
check_linker_flag(C "-l${libname}" mi_has_lib${libname})
|
||||
if (mi_has_lib${libname})
|
||||
message(VERBOSE "link library: -l${libname}")
|
||||
@ -363,15 +363,15 @@ endfunction()
|
||||
if(WIN32)
|
||||
list(APPEND mi_libraries psapi shell32 user32 advapi32 bcrypt)
|
||||
else()
|
||||
add_link_library("pthread" MI_LIB_PTHREAD)
|
||||
find_link_library("pthread" MI_LIB_PTHREAD)
|
||||
if(MI_LIB_PTHREAD)
|
||||
list(APPEND mi_libraries "${MI_LIB_PTHREAD}")
|
||||
endif()
|
||||
add_link_library("rt" MI_LIB_RT)
|
||||
find_link_library("rt" MI_LIB_RT)
|
||||
if(MI_LIB_RT)
|
||||
list(APPEND mi_libraries "${MI_LIB_RT}")
|
||||
endif()
|
||||
add_link_library("atomic" MI_LIB_ATOMIC)
|
||||
find_link_library("atomic" MI_LIB_ATOMIC)
|
||||
if(MI_LIB_ATOMIC)
|
||||
list(APPEND mi_libraries "${MI_LIB_ATOMIC}")
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user