From 490b2fdc46ca80258f61bbbb169479fdae284496 Mon Sep 17 00:00:00 2001 From: Paulo Neves Date: Wed, 7 Sep 2022 12:12:33 +0200 Subject: [PATCH] CMakeLists.txt: Make libnsl optional YP libnsl functionality is already protected by ifdef guards where necessary and there are uses where it is not required. Add USE_LIBNSL as a build system knob. Signed-off-by: Paulo Neves --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 737a2ddd3..64038116a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -197,13 +197,13 @@ set(SYSTEM_LIBRARIES ${SYSTEM_LIBRARIES} ) -if (NOT BSDBASED) +if (USE_LIBNSL) find_package(NSL) # sockets set(SYSTEM_LIBRARIES ${SYSTEM_LIBRARIES} ${NSL_LIBRARY} ) -endif (NOT BSDBASED) +endif (USE_LIBNSL) set(LIBNTIRPC_MAP "${PROJECT_BINARY_DIR}/src/libntirpc.map") # subst files (need add_custom_command for dependency, fyi) @@ -221,6 +221,7 @@ message(STATUS) message(STATUS "-------------------------------------------------------") message(STATUS "TIRPC_EPOLL = ${TIRPC_EPOLL}") message(STATUS "USE_RPC_RDMA = ${USE_RPC_RDMA}") +message(STATUS "USE_LIBNSL = ${USE_LIBNSL}") message(STATUS "USE_GSS = ${USE_GSS}") message(STATUS "USE_PROFILE = ${USE_PROFILE}") message(STATUS "USE_LTTNG_NTIRPC = ${USE_LTTNG_NTIRPC}")