@@ -29,4 +29,103 @@ index 24ec297aa27b..e77c38435bba 100644
2929+ endif (REQUIRE_LIBHDFSPP)
3030
3131 if(REQUIRE_LIBWEBHDFS)
32- add_subdirectory(contrib/libwebhdfs)
32+ add_subdirectory(contrib/libwebhdfs)
33+ diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/pom.xml b/hadoop-hdfs-project/hadoop-hdfs-native-client/pom.xml
34+ index 04cf060..a4fc0e3 100644
35+ --- a/hadoop-hdfs-project/hadoop-hdfs-native-client/pom.xml
36+ +++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/pom.xml
37+ @@ -147,7 +147,7 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
38+ <mkdir dir="${project.build.directory}/native"/>
39+ <exec executable="cmake" dir="${project.build.directory}/native"
40+ failonerror="true">
41+ - <arg line="${basedir}/src/ -DGENERATED_JAVAH=${project.build.directory}/native/javah -DJVM_ARCH_DATA_MODEL=${sun.arch.data.model} -DHADOOP_BUILD=1 -DREQUIRE_FUSE=${require.fuse} -DREQUIRE_VALGRIND=${require.valgrind} -A '${env.PLATFORM}'"/>
42+ + <arg line="${basedir}/src/ -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DGENERATED_JAVAH=${project.build.directory}/native/javah -DJVM_ARCH_DATA_MODEL=${sun.arch.data.model} -DHADOOP_BUILD=1 -DREQUIRE_FUSE=${require.fuse} -DREQUIRE_VALGRIND=${require.valgrind} -A '${env.PLATFORM}'"/>
43+ <arg line="${native_cmake_args}"/>
44+ </exec>
45+ <exec executable="msbuild" dir="${project.build.directory}/native"
46+ diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/CMakeLists.txt b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/CMakeLists.txt
47+ index 24ec297..e158d7b 100644
48+ --- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/CMakeLists.txt
49+ +++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/CMakeLists.txt
50+ @@ -16,7 +16,8 @@
51+ # limitations under the License.
52+ #
53+
54+ - cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
55+ + cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
56+ + project(hadoop-hdfs-native-client)
57+
58+ enable_testing()
59+
60+ diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/CMakeLists.txt b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/CMakeLists.txt
61+ index c1ba3ad..44b18e6 100644
62+ --- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/CMakeLists.txt
63+ +++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/CMakeLists.txt
64+ @@ -16,8 +16,6 @@
65+ # limitations under the License.
66+ #
67+
68+ - cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
69+ -
70+ set(CMAKE_SKIP_RPATH TRUE)
71+
72+ # Flatten a list into a string.
73+ diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs-examples/CMakeLists.txt b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs-examples/CMakeLists.txt
74+ index 1d33639..b950745 100644
75+ --- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs-examples/CMakeLists.txt
76+ +++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs-examples/CMakeLists.txt
77+ @@ -16,8 +16,6 @@
78+ # limitations under the License.
79+ #
80+
81+ - cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
82+ -
83+ include_directories(
84+ ${CMAKE_CURRENT_SOURCE_DIR}/../libhdfs/include
85+ ${GENERATED_JAVAH}
86+ @@ -31,4 +29,4 @@ add_executable(hdfs_read libhdfs_read.c)
87+ target_link_libraries(hdfs_read hdfs)
88+
89+ add_executable(hdfs_write libhdfs_write.c)
90+ - target_link_libraries(hdfs_write hdfs)
91+ \ No newline at end of file
92+ + target_link_libraries(hdfs_write hdfs)
93+ diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs-tests/CMakeLists.txt b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs-tests/CMakeLists.txt
94+ index f16cc9e..01a671f 100644
95+ --- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs-tests/CMakeLists.txt
96+ +++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs-tests/CMakeLists.txt
97+ @@ -16,8 +16,6 @@
98+ # limitations under the License.
99+ #
100+
101+ - cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
102+ -
103+ include_directories(
104+ ${CMAKE_CURRENT_SOURCE_DIR}/../libhdfs/include
105+ ${GENERATED_JAVAH}
106+ diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs/CMakeLists.txt b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs/CMakeLists.txt
107+ index a7fb311..b1e6f4e 100644
108+ --- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs/CMakeLists.txt
109+ +++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs/CMakeLists.txt
110+ @@ -16,8 +16,6 @@
111+ # limitations under the License.
112+ #
113+
114+ - cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
115+ -
116+ add_definitions(-DLIBHDFS_DLL_EXPORT)
117+
118+ include_directories(
119+ 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
120+ index f4dd492..0e9eee3 100644
121+ --- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/CMakeLists.txt
122+ +++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/CMakeLists.txt
123+ @@ -26,8 +26,6 @@
124+
125+ project (libhdfspp)
126+
127+ - cmake_minimum_required(VERSION 2.8)
128+ -
129+ enable_testing()
130+ include (CTest)
131+
0 commit comments