ClickHouse/cmake/find_rt.cmake
proller 46037bb670 Allow link with jemalloc (#404)
* Allow link with jemalloc

* wip

* fix

* fix
2017-01-28 00:00:02 +04:00

15 lines
353 B
CMake

if (APPLE)
find_library (RT_LIBRARIES apple_rt)
else ()
find_library (RT_LIBRARIES rt)
endif ()
message(STATUS "Using rt: ${RT_LIBRARIES}")
function (target_link_rt_by_force TARGET)
if (NOT APPLE)
set (FLAGS "-Wl,-no-as-needed -lrt -Wl,-as-needed")
set_property (TARGET ${TARGET} APPEND PROPERTY LINK_FLAGS "${FLAGS}")
endif ()
endfunction ()