mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-01-14 00:27:59 +08:00
use find_library for pthread (issue #496)
This commit is contained in:
parent
c858690dea
commit
d575aacfde
@ -210,13 +210,14 @@ endif()
|
|||||||
if(WIN32)
|
if(WIN32)
|
||||||
list(APPEND mi_libraries psapi shell32 user32 advapi32 bcrypt)
|
list(APPEND mi_libraries psapi shell32 user32 advapi32 bcrypt)
|
||||||
else()
|
else()
|
||||||
if(NOT ${CMAKE_C_COMPILER} MATCHES "android")
|
find_library(LIBPTHREAD pthread)
|
||||||
list(APPEND mi_libraries pthread)
|
if (LIBPTHREAD)
|
||||||
find_library(LIBRT rt)
|
list(APPEND mi_libraries ${LIBPTHREAD})
|
||||||
if(LIBRT)
|
|
||||||
list(APPEND mi_libraries ${LIBRT})
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
find_library(LIBRT rt)
|
||||||
|
if(LIBRT)
|
||||||
|
list(APPEND mi_libraries ${LIBRT})
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (MI_USE_LIBATOMIC)
|
if (MI_USE_LIBATOMIC)
|
||||||
@ -270,6 +271,8 @@ else()
|
|||||||
message(STATUS "C Compiler : ${CMAKE_C_COMPILER}")
|
message(STATUS "C Compiler : ${CMAKE_C_COMPILER}")
|
||||||
endif()
|
endif()
|
||||||
message(STATUS "Compiler flags : ${mi_cflags}")
|
message(STATUS "Compiler flags : ${mi_cflags}")
|
||||||
|
message(STATUS "Compiler defines : ${mi_defines}")
|
||||||
|
message(STATUS "Link libraries : ${mi_libraries}")
|
||||||
message(STATUS "Build targets : ${mi_build_targets}")
|
message(STATUS "Build targets : ${mi_build_targets}")
|
||||||
message(STATUS "")
|
message(STATUS "")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user