diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/CMakeLists.txt b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/CMakeLists.txt index f0f005d53b5..bb7fd06a922 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/CMakeLists.txt +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/CMakeLists.txt @@ -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)