hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] apache-yetus commented on a change in pull request #485: HDFS-14244. Refactor the libhdfspp cmake build files.
Date Fri, 22 Feb 2019 05:37:24 GMT
apache-yetus commented on a change in pull request #485: HDFS-14244. Refactor the libhdfspp
cmake build files.
URL: https://github.com/apache/hadoop/pull/485#discussion_r259217825

 File path: hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/CMakeLists.txt
 @@ -16,10 +16,127 @@
 # limitations under the License.
+cmake_minimum_required(VERSION 2.8.12)
+if (POLICY CMP0042)
+  cmake_policy(SET CMP0042 NEW) # suppress warning about mac rpath
+endif ()
+include (CTest)
+find_package(ASIO REQUIRED)
+find_package(OpenSSL REQUIRED)
+find_package(Protobuf REQUIRED)
+find_package(RapidXML REQUIRED)
+find_package(Threads REQUIRED)
+find_package(URIparser REQUIRED)
+# Check if thread_local is supported
+    "#include <thread>
+    int main(void) {
+      thread_local int s;
+      return 0;
+    }"
+  message(FATAL_ERROR "FATAL ERROR: The required feature thread_local storage is not supported
by your compiler. Known compilers that support this feature: GCC 4.8+, Visual Studio 2015+,
Clang (community version 3.3+), Clang (version for Xcode 8+ and iOS 9+).")
+# Check if PROTOC library was compiled with the compatible compiler by trying
+# to compile some dummy code
+set (CMAKE_REQUIRED_LIBRARIES protobuf protoc)
+    "#include <google/protobuf/io/printer.h>
+    #include <string>
+    int main(void) {
+      ::google::protobuf::io::ZeroCopyOutputStream *out = NULL;
+      ::google::protobuf::io::Printer printer(out, '$');
+      printer.PrintRaw(std::string(\"test\"));
+      return 0;
+    }"
+  message(WARNING "WARNING: the Protocol Buffers Library and the hdfs++ Library must both
be compiled with the same (or compatible) compiler. Normally only the same major versions
of the same compiler are compatible with each other.")
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile
+add_custom_target(doc ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile
+                  COMMENT "Generating API documentation with Doxygen" VERBATIM)
+  )
+# Put the protobuf stuff first, since the version has to match between
+# the library, generated code, and the include files.
+include_directories(BEFORE ${PROTOBUF_INCLUDE_DIR})
 Review comment:
   whitespace:end of line

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org

View raw message