HDFS-16666. Pass CMake args for Windows in pom.xml (#4574)

* This PR passes the necessary CMake args in the
  pom.xml needed for building HDFS native client
  on Windows.
* These arguments are exposed as maven options
  and can be passed from the command-line.
This commit is contained in:
Gautham B A 2022-07-19 10:45:59 +05:30 committed by GitHub
parent a55ace7bc0
commit 21b8952125
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 1 deletions

View File

@ -147,7 +147,23 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
<mkdir dir="${project.build.directory}/native"/>
<exec executable="cmake" dir="${project.build.directory}/native"
failonerror="true">
<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}'"/>
<arg line="${basedir}/src/"/>
<arg line="-DGENERATED_JAVAH=${project.build.directory}/native/javah"/>
<arg line="-DJVM_ARCH_DATA_MODEL=${sun.arch.data.model}"/>
<arg line="-DREQUIRE_VALGRIND=${require.valgrind}"/>
<arg line="-DHADOOP_BUILD=1"/>
<arg line="-DREQUIRE_LIBWEBHDFS=${require.libwebhdfs}"/>
<arg line="-DREQUIRE_OPENSSL=${require.openssl}"/>
<arg line="-DCUSTOM_OPENSSL_PREFIX=${openssl.prefix}"/>
<arg line="-DCUSTOM_OPENSSL_LIB=${openssl.lib}"/>
<arg line="-DCUSTOM_OPENSSL_INCLUDE=${openssl.include}"/>
<arg line="-DCMAKE_PREFIX_PATH=${windows.cmake.prefix.path}"/>
<arg line="-DCMAKE_TOOLCHAIN_FILE=${windows.cmake.toolchain.file}"/>
<arg line="-DCMAKE_BUILD_TYPE=${windows.cmake.build.type}"/>
<arg line="-DBUILD_SHARED_HDFSPP=${windows.build.hdfspp.dll}"/>
<arg line="-DNO_SASL=${windows.no.sasl}"/>
<arg line="-DREQUIRE_FUSE=${require.fuse}"/>
<arg line="-A '${env.PLATFORM}'"/>
<arg line="${native_cmake_args}"/>
</exec>
<exec executable="msbuild" dir="${project.build.directory}/native"