2020-09-22 19:04:15 +00:00
|
|
|
if(NOT ANDROID)
|
|
|
|
if(NOT UNIX)
|
|
|
|
return()
|
|
|
|
endif()
|
2019-07-21 23:39:56 +00:00
|
|
|
endif()
|
|
|
|
|
2020-04-21 11:51:04 +00:00
|
|
|
include(CheckCXXSourceCompiles)
|
|
|
|
include(CheckLibraryExists)
|
|
|
|
|
2020-05-21 14:18:23 +00:00
|
|
|
if(WITH_JEMALLOC)
|
|
|
|
find_package(Jemalloc REQUIRED)
|
|
|
|
if(NOT JEMALLOC_FOUND)
|
|
|
|
message(FATAL_ERROR "did not find jemalloc")
|
|
|
|
endif()
|
|
|
|
add_definitions(-DUSE_JEMALLOC)
|
|
|
|
message(STATUS "using jemalloc")
|
|
|
|
endif()
|
|
|
|
|
2019-04-28 15:57:41 +00:00
|
|
|
add_definitions(-DUNIX)
|
|
|
|
add_definitions(-DPOSIX)
|
2019-04-29 23:48:43 +00:00
|
|
|
|
2019-08-29 13:59:04 +00:00
|
|
|
if(EMBEDDED_CFG OR ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
2019-08-27 13:47:44 +00:00
|
|
|
link_libatomic()
|
|
|
|
endif()
|
|
|
|
|
2020-05-17 19:41:48 +00:00
|
|
|
if (${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
2020-02-17 23:01:37 +00:00
|
|
|
add_definitions(-D_BSD_SOURCE)
|
|
|
|
add_definitions(-D_GNU_SOURCE)
|
|
|
|
add_definitions(-D_XOPEN_SOURCE=700)
|
2019-04-28 15:57:41 +00:00
|
|
|
endif()
|