You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2019/02/26 19:53:19 UTC

[GitHub] hadoop-yetus commented on a change in pull request #485: HDFS-14244. Refactor the libhdfspp cmake build files.

hadoop-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_r260459384
 
 

 ##########
 File path: hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/CMake/FindPackageExtension.cmake
 ##########
 @@ -0,0 +1,135 @@
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Input:
+#   h_file: the name of a header file to find
+#   lib_names: a list of library names to find
+#   allow_any: Allow either static or shared libraries
+
+# Environment:
+#   CMAKE_FIND_PACKAGE_NAME: the name of the package to build
+#   <name>_HOME: variable is used to check for headers and library
+#   BUILD_SHARED_LIBRARIES: whether to find shared instead of static libraries
+
+# Outputs:
+#   <name>_INCLUDE_DIR: directory containing headers
+#   <name>_LIBRARIES: libraries to link with
+#   <name>_FOUND: whether uriparser has been found
+
+function (findPackageExtension h_file lib_names allow_any)
+  set (_name ${CMAKE_FIND_PACKAGE_NAME})
+  string (TOUPPER ${_name} _upper_name)
+
+  # protect against running it a second time
+  if (NOT DEFINED ${_upper_name}_FOUND)
+
+    # find the name of the home variable and get it from the environment
+    set (_home_name "${_upper_name}_HOME")
+    if (DEFINED ENV{${_home_name}})
+      set(_home "$ENV{${_home_name}}")
+    elseif (DEFINED ${_home_name})
+      set(_home ${${_home_name}})
+    endif ()
 
 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:
users@infra.apache.org


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