ClickHouse/cmake/find_rt.cmake

17 lines
372 B
CMake
Raw Normal View History

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 ()