HADOOP-13835. Move Google Test Framework code from mapreduce to hadoop-common. Contributed by Varun Vasudev.
This commit is contained in:
parent
8e63fa98ea
commit
b2a3d6c519
@ -289,7 +289,7 @@ For src/main/native/src/org/apache/hadoop/io/compress/lz4/{lz4.h,lz4.c,lz4hc.h,l
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
For hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/gtest
|
For hadoop-common-project/hadoop-common/src/main/native/gtest
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
Copyright 2008, Google Inc.
|
Copyright 2008, Google Inc.
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
@ -523,6 +523,7 @@
|
|||||||
<exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc.h</exclude>
|
<exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc.h</exclude>
|
||||||
<exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc.c</exclude>
|
<exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc.c</exclude>
|
||||||
<exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc_encoder.h</exclude>
|
<exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc_encoder.h</exclude>
|
||||||
|
<exclude>src/main/native/gtest/**/*</exclude>
|
||||||
<exclude>src/test/resources/test-untar.tgz</exclude>
|
<exclude>src/test/resources/test-untar.tgz</exclude>
|
||||||
<exclude>src/test/resources/test.har/_SUCCESS</exclude>
|
<exclude>src/test/resources/test.har/_SUCCESS</exclude>
|
||||||
<exclude>src/test/resources/test.har/_index</exclude>
|
<exclude>src/test/resources/test.har/_index</exclude>
|
||||||
|
@ -92,8 +92,6 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<excludes>
|
<excludes>
|
||||||
<exclude>src/main/native/testData/*</exclude>
|
<exclude>src/main/native/testData/*</exclude>
|
||||||
<!-- gtest has a compatible license -->
|
|
||||||
<exclude>src/main/native/gtest/**/*</exclude>
|
|
||||||
</excludes>
|
</excludes>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
@ -21,6 +21,9 @@ cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
|
|||||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/../../../../hadoop-common-project/hadoop-common/)
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/../../../../hadoop-common-project/hadoop-common/)
|
||||||
include(HadoopCommon)
|
include(HadoopCommon)
|
||||||
|
|
||||||
|
# Set gtest path
|
||||||
|
set(GTEST_SRC_DIR ${CMAKE_SOURCE_DIR}/../../../../hadoop-common-project/hadoop-common/src/main/native/gtest)
|
||||||
|
|
||||||
# Add extra compiler and linker flags.
|
# Add extra compiler and linker flags.
|
||||||
# -Wno-sign-compare
|
# -Wno-sign-compare
|
||||||
hadoop_add_compiler_flags("-DNDEBUG -DSIMPLE_MEMCPY -fno-strict-aliasing")
|
hadoop_add_compiler_flags("-DNDEBUG -DSIMPLE_MEMCPY -fno-strict-aliasing")
|
||||||
@ -94,9 +97,10 @@ include_directories(
|
|||||||
${CMAKE_BINARY_DIR}
|
${CMAKE_BINARY_DIR}
|
||||||
${JNI_INCLUDE_DIRS}
|
${JNI_INCLUDE_DIRS}
|
||||||
${SNAPPY_INCLUDE_DIR}
|
${SNAPPY_INCLUDE_DIR}
|
||||||
|
${GTEST_SRC_DIR}/include
|
||||||
)
|
)
|
||||||
# add gtest as system library to suppress gcc warnings
|
# add gtest as system library to suppress gcc warnings
|
||||||
include_directories(SYSTEM ${SRC}/gtest/include)
|
include_directories(SYSTEM ${GTEST_SRC_DIR}/include)
|
||||||
|
|
||||||
set(CMAKE_MACOSX_RPATH TRUE)
|
set(CMAKE_MACOSX_RPATH TRUE)
|
||||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
||||||
@ -155,7 +159,7 @@ hadoop_add_dual_library(nativetask
|
|||||||
|
|
||||||
target_link_libraries(nativetask ${NT_DEPEND_LIBRARY})
|
target_link_libraries(nativetask ${NT_DEPEND_LIBRARY})
|
||||||
|
|
||||||
add_library(gtest ${SRC}/gtest/gtest-all.cc)
|
add_library(gtest ${GTEST_SRC_DIR}/gtest-all.cc)
|
||||||
set_target_properties(gtest PROPERTIES COMPILE_FLAGS "-w")
|
set_target_properties(gtest PROPERTIES COMPILE_FLAGS "-w")
|
||||||
add_executable(nttest
|
add_executable(nttest
|
||||||
${SRC}/test/lib/TestByteArray.cc
|
${SRC}/test/lib/TestByteArray.cc
|
||||||
|
Loading…
Reference in New Issue
Block a user