hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ji...@apache.org
Subject [23/52] [abbrv] git commit: MAPREDUCE-5977. Fix or suppress native-task gcc warnings. Contributed by Manu Zhang.
Date Mon, 15 Sep 2014 17:49:32 GMT
MAPREDUCE-5977. Fix or suppress native-task gcc warnings. Contributed by Manu Zhang.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/fad4524c
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/fad4524c
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/fad4524c

Branch: refs/heads/HDFS-6584
Commit: fad4524c85848b8efe27dcf4a3e3a9ac1725bd2a
Parents: 6d39367
Author: Todd Lipcon <todd@apache.org>
Authored: Wed Aug 27 12:23:03 2014 -0700
Committer: Todd Lipcon <todd@apache.org>
Committed: Wed Aug 27 12:25:42 2014 -0700

----------------------------------------------------------------------
 .../CHANGES.MAPREDUCE-2841.txt                  |     2 +
 .../src/CMakeLists.txt                          |     9 +-
 .../src/main/native/gtest/gtest.h               | 19541 -----------------
 .../src/main/native/gtest/include/gtest/gtest.h | 19541 +++++++++++++++++
 .../src/main/native/src/NativeTask.h            |     2 -
 .../src/main/native/src/codec/BlockCodec.cc     |     4 +-
 .../src/main/native/src/handler/BatchHandler.h  |     4 +-
 .../main/native/src/handler/CombineHandler.cc   |    10 +-
 .../src/main/native/src/lib/Buffers.h           |     4 +-
 .../src/main/native/src/lib/IFile.cc            |    11 +-
 .../main/native/src/lib/MapOutputCollector.cc   |    14 +-
 .../main/native/src/lib/MapOutputCollector.h    |     4 +-
 .../src/main/native/src/lib/Merge.cc            |     4 +-
 .../src/main/native/src/lib/PartitionBucket.h   |    12 +-
 .../src/main/native/src/lib/commons.h           |     3 +
 .../src/main/native/src/util/StringUtil.cc      |     6 +-
 .../src/main/native/test/TestCompressions.cc    |     7 +-
 .../src/main/native/test/TestIFile.cc           |     4 +
 .../src/main/native/test/lib/TestByteBuffer.cc  |     2 +-
 .../native/test/lib/TestFixSizeContainer.cc     |     2 +-
 .../src/main/native/test/lib/TestIterator.cc    |     2 -
 .../native/test/lib/TestMemBlockIterator.cc     |     6 +-
 .../src/main/native/test/lib/TestMemoryBlock.cc |     1 +
 .../src/main/native/test/util/TestHash.cc       |     2 +-
 24 files changed, 19600 insertions(+), 19597 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/fad4524c/hadoop-mapreduce-project/CHANGES.MAPREDUCE-2841.txt
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/CHANGES.MAPREDUCE-2841.txt b/hadoop-mapreduce-project/CHANGES.MAPREDUCE-2841.txt
index 95f7858..4dc08cb 100644
--- a/hadoop-mapreduce-project/CHANGES.MAPREDUCE-2841.txt
+++ b/hadoop-mapreduce-project/CHANGES.MAPREDUCE-2841.txt
@@ -15,3 +15,5 @@ MAPREDUCE-5978. native-task: remove test case for not supported codec Bzip2Codec
 MAPREDUCE-6006. native-task: add native tests to maven and fix bug in pom.xml (Binglin Chang
via todd)
 MAPREDUCE-6026. native-task: fix logging (Manu Zhang via todd)
 MAPREDUCE-6035. native-task: sources/test-sources jar distribution (Manu Zhang via todd)
+MAPREDUCE-5977. Fix or suppress native-task gcc warnings (Manu Zhang via todd)
+

http://git-wip-us.apache.org/repos/asf/hadoop/blob/fad4524c/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/CMakeLists.txt
b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/CMakeLists.txt
index 77b6109..0ab99db 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/CMakeLists.txt
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/CMakeLists.txt
@@ -90,7 +90,7 @@ SET(CMAKE_FIND_LIBRARY_SUFFIXES STORED_CMAKE_FIND_LIBRARY_SUFFIXES)
 
 # primitive configs
 set(PRFLAGS "-DSIMPLE_MEMCPY")
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PRFLAGS} -Wall")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PRFLAGS} -fno-strict-aliasing -Wall -Wno-sign-compare")
 set(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -no-undefined -version-info 0:1:0
     -L${_JAVA_HOME}/jre/lib/amd64/server -ljvm")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS} -g -O2 -DNDEBUG -fPIC")
@@ -150,7 +150,6 @@ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_BINARY_DIR}/config.h)
 
 include_directories(
     ${GENERATED_JAVAH}
-    ${D}
     ${D}/src
     ${D}/src/util
     ${D}/src/lib
@@ -160,6 +159,8 @@ include_directories(
     ${JNI_INCLUDE_DIRS}
     ${SNAPPY_INCLUDE_DIR}
 )
+# add gtest as system library to suppress gcc warnings
+include_directories(SYSTEM ${D}/gtest/include)
 
 
 SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
@@ -220,8 +221,9 @@ add_dual_library(nativetask
 
 target_link_libraries(nativetask ${NT_DEPEND_LIBRARY})
 
+add_library(gtest ${D}/gtest/gtest-all.cc)
+set_target_properties(gtest PROPERTIES COMPILE_FLAGS "-w")
 add_executable(nttest
-    ${D}/gtest/gtest-all.cc
     ${D}/test/lib/TestByteArray.cc
     ${D}/test/lib/TestByteBuffer.cc
     ${D}/test/lib/TestComparatorForDualPivotQuickSort.cc
@@ -260,6 +262,7 @@ ENDIF()
 
 target_link_libraries(nttest
      nativetask_static
+     gtest
      ${NT_DEPEND_LIBRARY}
 )
 


Mime
View raw message