From 5736b34b2abe756d91b3ba26abd896c135d3a773 Mon Sep 17 00:00:00 2001 From: Gautham B A Date: Fri, 26 Aug 2022 21:41:44 +0530 Subject: [PATCH] HDFS-16736. Link to Boost library in libhdfspp (#4782) --- .../src/main/native/libhdfspp/CMakeLists.txt | 7 ++++--- .../src/main/native/libhdfspp/lib/rpc/CMakeLists.txt | 1 + .../src/main/native/libhdfspp/tests/CMakeLists.txt | 2 -- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/CMakeLists.txt b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/CMakeLists.txt index 28cce66a71..a42ee2e211 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/CMakeLists.txt +++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/CMakeLists.txt @@ -28,7 +28,7 @@ project (libhdfspp) cmake_minimum_required(VERSION 2.8) -find_package (Boost 1.72.0 REQUIRED) +find_package (Boost 1.72.0 REQUIRED COMPONENTS date_time) enable_testing() set(CMAKE_CXX_STANDARD 17) @@ -283,7 +283,7 @@ if (HADOOP_BUILD AND NOT MSVC) ${OPENSSL_LIBRARIES} ${SASL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} - ) + ${Boost_LIBRARIES}) set_target_properties(hdfspp PROPERTIES SOVERSION ${LIBHDFSPP_VERSION}) hadoop_dual_output_directory(hdfspp ${OUT_DIR}) else (HADOOP_BUILD AND NOT MSVC) @@ -293,7 +293,8 @@ else (HADOOP_BUILD AND NOT MSVC) ${PROTOBUF_LIBRARY} ${OPENSSL_LIBRARIES} ${SASL_LIBRARIES} - ${CMAKE_THREAD_LIBS_INIT}) + ${CMAKE_THREAD_LIBS_INIT} + ${Boost_LIBRARIES}) if(BUILD_SHARED_HDFSPP) add_library(hdfspp SHARED ${EMPTY_FILE_CC} ${LIBHDFSPP_ALL_OBJECTS}) set_target_properties(hdfspp PROPERTIES SOVERSION ${LIBHDFSPP_VERSION}) diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/CMakeLists.txt b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/CMakeLists.txt index b50134eda9..5503ef59fb 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/CMakeLists.txt +++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/CMakeLists.txt @@ -30,3 +30,4 @@ target_include_directories(rpc_obj PRIVATE ../../lib) add_dependencies(rpc_obj proto) add_library(rpc $) target_include_directories(rpc PRIVATE ../../lib) +target_link_libraries(rpc PRIVATE ${Boost_LIBRARIES}) diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/CMakeLists.txt b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/CMakeLists.txt index 9182054e85..7eb432f31a 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/CMakeLists.txt +++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/CMakeLists.txt @@ -16,8 +16,6 @@ # limitations under the License. # -find_package(Boost REQUIRED COMPONENTS date_time) - # Delegate some functionality to libhdfs, until libhdfspp is complete. set (LIBHDFS_SRC_DIR ../../libhdfs) set (LIBHDFS_TESTS_DIR ../../libhdfs-tests)