ClickHouse/cmake/find_rt.cmake
2016-12-07 00:01:19 +03:00

17 lines
372 B
CMake

if (APPLE)
set (RT_LIBRARIES "apple_rt")
else ()
if (USE_STATIC_LIBRARIES)
set (RT_LIBRARIES "librt.a")
else ()
set (RT_LIBRARIES "rt")
endif ()
endif ()
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 ()