Skip to content

Commit

Permalink
CMakeLists.txt: Make libnsl optional
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
ptsneves committed Sep 7, 2022
1 parent f10d11a commit 490b2fd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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}")
Expand Down

0 comments on commit 490b2fd

Please sign in to comment.