YARN-9487. NodeManager native build shouldn't link against librt on macOS. Contributed by Siyao Meng.

Signed-off-by: Wei-Chiu Chuang <weichiu@apache.org>
This commit is contained in:
Siyao Meng 2019-04-17 22:56:23 -07:00 committed by Wei-Chiu Chuang
parent 685cb83e4c
commit 6e4399ea61
1 changed files with 6 additions and 1 deletions

View File

@ -190,5 +190,10 @@ add_executable(test-oom-listener
main/native/oom-listener/impl/oom_listener.h
main/native/oom-listener/test/oom_listener_test_main.cc
)
target_link_libraries(test-oom-listener gtest rt)
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
# macOS doesn't have librt
target_link_libraries(test-oom-listener gtest)
else()
target_link_libraries(test-oom-listener gtest rt)
endif()
output_directory(test-oom-listener test)