|
@@ -201,26 +201,36 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
|
<build>
|
|
|
<plugins>
|
|
|
<plugin>
|
|
|
- <groupId>org.apache.maven.plugins</groupId>
|
|
|
- <artifactId>maven-antrun-plugin</artifactId>
|
|
|
+ <groupId>org.apache.hadoop</groupId>
|
|
|
+ <artifactId>hadoop-maven-plugins</artifactId>
|
|
|
<executions>
|
|
|
<execution>
|
|
|
- <id>make</id>
|
|
|
+ <id>cmake-compile</id>
|
|
|
<phase>compile</phase>
|
|
|
- <goals><goal>run</goal></goals>
|
|
|
+ <goals><goal>cmake-compile</goal></goals>
|
|
|
<configuration>
|
|
|
- <target>
|
|
|
- <mkdir dir="${project.build.directory}"/>
|
|
|
- <exec executable="cmake" dir="${project.build.directory}" 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_LIBWEBHDFS=${require.libwebhdfs} -DREQUIRE_FUSE=${require.fuse} -DREQUIRE_VALGRIND=${require.valgrind} "/>
|
|
|
- <arg line="${native_cmake_args}"/>
|
|
|
- </exec>
|
|
|
- <exec executable="make" dir="${project.build.directory}" failonerror="true">
|
|
|
- <arg line="${native_make_args}"/>
|
|
|
- </exec>
|
|
|
- </target>
|
|
|
+ <source>${basedir}/src</source>
|
|
|
+ <vars>
|
|
|
+ <GENERATED_JAVAH>${project.build.directory}/native/javah</GENERATED_JAVAH>
|
|
|
+ <JVM_ARCH_DATA_MODEL>${sun.arch.data.model}</JVM_ARCH_DATA_MODEL>
|
|
|
+ <REQUIRE_FUSE>${require.fuse}</REQUIRE_FUSE>
|
|
|
+ <REQUIRE_VALGRIND>${require.valgrind}</REQUIRE_VALGRIND>
|
|
|
+ <HADOOP_BUILD>1</HADOOP_BUILD>
|
|
|
+ <REQUIRE_LIBWEBHDFS>${require.libwebhdfs}</REQUIRE_LIBWEBHDFS>
|
|
|
+ <REQUIRE_OPENSSL>${require.openssl}</REQUIRE_OPENSSL>
|
|
|
+ <CUSTOM_OPENSSL_PREFIX>${openssl.prefix}</CUSTOM_OPENSSL_PREFIX>
|
|
|
+ <CUSTOM_OPENSSL_LIB>${openssl.lib}</CUSTOM_OPENSSL_LIB>
|
|
|
+ <CUSTOM_OPENSSL_INCLUDE>${openssl.include}</CUSTOM_OPENSSL_INCLUDE>
|
|
|
+ </vars>
|
|
|
+ <output>${project.build.directory}</output>
|
|
|
</configuration>
|
|
|
</execution>
|
|
|
+ </executions>
|
|
|
+ </plugin>
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
+ <artifactId>maven-antrun-plugin</artifactId>
|
|
|
+ <executions>
|
|
|
<execution>
|
|
|
<id>native_tests</id>
|
|
|
<phase>test</phase>
|
|
@@ -236,6 +246,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
|
<env key="CLASSPATH" value="${test_classpath}:${compile_classpath}"/>
|
|
|
<!-- Make sure libhadoop.so is on LD_LIBRARY_PATH. -->
|
|
|
<env key="LD_LIBRARY_PATH" value="${env.LD_LIBRARY_PATH}:${project.build.directory}/native/target/usr/local/lib:${hadoop.common.build.dir}/native/target/usr/local/lib"/>
|
|
|
+ <env key="DYLD_LIBRARY_PATH" value="${env.DYLD_LIBRARY_PATH}:${project.build.directory}/native/target/usr/local/lib:${hadoop.common.build.dir}/native/target/usr/local/lib"/>
|
|
|
</exec>
|
|
|
</target>
|
|
|
</configuration>
|
|
@@ -246,7 +257,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
|
</build>
|
|
|
</profile>
|
|
|
<profile>
|
|
|
- <id>test-patch</id>
|
|
|
+ <id>native-clang</id>
|
|
|
<activation>
|
|
|
<activeByDefault>false</activeByDefault>
|
|
|
</activation>
|
|
@@ -256,35 +267,40 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
|
<build>
|
|
|
<plugins>
|
|
|
<plugin>
|
|
|
- <groupId>org.apache.maven.plugins</groupId>
|
|
|
- <artifactId>maven-antrun-plugin</artifactId>
|
|
|
+ <groupId>org.apache.hadoop</groupId>
|
|
|
+ <artifactId>hadoop-maven-plugins</artifactId>
|
|
|
<executions>
|
|
|
<execution>
|
|
|
- <id>make_altern</id>
|
|
|
+ <id>cmake-compile-clang</id>
|
|
|
<phase>compile</phase>
|
|
|
- <goals><goal>run</goal></goals>
|
|
|
+ <goals><goal>cmake-compile</goal></goals>
|
|
|
<configuration>
|
|
|
- <target>
|
|
|
- <mkdir dir="${project.build.directory}/altern"/>
|
|
|
- <condition property="c_compiler" value="clang" else="gcc">
|
|
|
- <contains string="${env.CC}" substring="gcc"/>
|
|
|
- </condition>
|
|
|
- <condition property="cxx_compiler" value="clang++" else="g++">
|
|
|
- <contains string="${env.CXX}" substring="g++"/>
|
|
|
- </condition>
|
|
|
- <exec executable="cmake" dir="${project.build.directory}/altern" failonerror="true">
|
|
|
- <arg line="${basedir}/src/ -DGENERATED_JAVAH=${project.build.directory}/altern/native/javah -DJVM_ARCH_DATA_MODEL=${sun.arch.data.model} -DHADOOP_BUILD=1 -DREQUIRE_LIBWEBHDFS=${require.libwebhdfs} -DREQUIRE_FUSE=${require.fuse} -DREQUIRE_VALGRIND=${require.valgrind} "/>
|
|
|
- <arg line="-DCMAKE_C_COMPILER=${c_compiler} -DCMAKE_CXX_COMPILER=${cxx_compiler}"/>
|
|
|
- <arg line="${native_cmake_args}"/>
|
|
|
- </exec>
|
|
|
- <exec executable="make" dir="${project.build.directory}/altern" failonerror="true">
|
|
|
- <arg line="${native_make_args}"/>
|
|
|
- </exec>
|
|
|
- </target>
|
|
|
+ <source>${basedir}/src</source>
|
|
|
+ <vars>
|
|
|
+ <CMAKE_C_COMPILER>clang</CMAKE_C_COMPILER>
|
|
|
+ <CMAKE_CXX_COMPILER>clang++</CMAKE_CXX_COMPILER>
|
|
|
+ <GENERATED_JAVAH>${project.build.directory}/native/javah</GENERATED_JAVAH>
|
|
|
+ <JVM_ARCH_DATA_MODEL>${sun.arch.data.model}</JVM_ARCH_DATA_MODEL>
|
|
|
+ <REQUIRE_FUSE>${require.fuse}</REQUIRE_FUSE>
|
|
|
+ <REQUIRE_VALGRIND>${require.valgrind}</REQUIRE_VALGRIND>
|
|
|
+ <HADOOP_BUILD>1</HADOOP_BUILD>
|
|
|
+ <REQUIRE_LIBWEBHDFS>${require.libwebhdfs}</REQUIRE_LIBWEBHDFS>
|
|
|
+ <REQUIRE_OPENSSL>${require.openssl}</REQUIRE_OPENSSL>
|
|
|
+ <CUSTOM_OPENSSL_PREFIX>${openssl.prefix}</CUSTOM_OPENSSL_PREFIX>
|
|
|
+ <CUSTOM_OPENSSL_LIB>${openssl.lib}</CUSTOM_OPENSSL_LIB>
|
|
|
+ <CUSTOM_OPENSSL_INCLUDE>${openssl.include}</CUSTOM_OPENSSL_INCLUDE>
|
|
|
+ </vars>
|
|
|
+ <output>${project.build.directory}/clang</output>
|
|
|
</configuration>
|
|
|
</execution>
|
|
|
+ </executions>
|
|
|
+ </plugin>
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
+ <artifactId>maven-antrun-plugin</artifactId>
|
|
|
+ <executions>
|
|
|
<execution>
|
|
|
- <id>native_tests_altern</id>
|
|
|
+ <id>native_tests_clang</id>
|
|
|
<phase>test</phase>
|
|
|
<goals><goal>run</goal></goals>
|
|
|
<configuration>
|
|
@@ -292,26 +308,17 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
|
<target>
|
|
|
<property name="compile_classpath" refid="maven.compile.classpath"/>
|
|
|
<property name="test_classpath" refid="maven.test.classpath"/>
|
|
|
- <exec executable="ctest" failonerror="true" dir="${project.build.directory}/altern">
|
|
|
+ <exec executable="ctest" failonerror="true" dir="${project.build.directory}/clang">
|
|
|
<arg line="--output-on-failure"/>
|
|
|
<arg line="${native_ctest_args}"/>
|
|
|
<env key="CLASSPATH" value="${test_classpath}:${compile_classpath}"/>
|
|
|
<!-- Make sure libhadoop.so is on LD_LIBRARY_PATH. -->
|
|
|
- <env key="LD_LIBRARY_PATH" value="${env.LD_LIBRARY_PATH}:${project.build.directory}/altern/target/usr/local/lib:${hadoop.common.build.dir}/native/target/usr/local/lib"/>
|
|
|
+ <env key="LD_LIBRARY_PATH" value="${env.LD_LIBRARY_PATH}:${project.build.directory}/clang/target/usr/local/lib:${hadoop.common.build.dir}/native/target/usr/local/lib"/>
|
|
|
+ <env key="DYLD_LIBRARY_PATH" value="${env.DYLD_LIBRARY_PATH}:${project.build.directory}/clang/target/usr/local/lib:${hadoop.common.build.dir}/native/target/usr/local/lib"/>
|
|
|
</exec>
|
|
|
</target>
|
|
|
</configuration>
|
|
|
</execution>
|
|
|
- <execution>
|
|
|
- <id>clean_altern</id>
|
|
|
- <phase>test</phase>
|
|
|
- <goals><goal>run</goal></goals>
|
|
|
- <configuration>
|
|
|
- <target>
|
|
|
- <delete dir="${project.build.directory}/altern" includeemptydirs="true"/>
|
|
|
- </target>
|
|
|
- </configuration>
|
|
|
- </execution>
|
|
|
</executions>
|
|
|
</plugin>
|
|
|
</plugins>
|