cloudflare/ClickHouse
Publicmirrored fromhttps://github.com/cloudflare/ClickHouse
cmake/find_rt.cmake
16lines · modecode
| 1 | if (APPLE) |
| 2 | set (RT_LIBRARIES "apple_rt") |
| 3 | else () |
| 4 | if (USE_STATIC_LIBRARIES) |
| 5 | set (RT_LIBRARIES "librt.a") |
| 6 | else () |
| 7 | set (RT_LIBRARIES "rt") |
| 8 | endif () |
| 9 | endif () |
| 10 | |
| 11 | function (target_link_rt_by_force TARGET) |
| 12 | if (NOT APPLE) |
| 13 | set (FLAGS "-Wl,-no-as-needed -lrt -Wl,-as-needed") |
| 14 | set_property (TARGET ${TARGET} APPEND PROPERTY LINK_FLAGS "${FLAGS}") |
| 15 | endif () |
| 16 | endfunction () |