[ 
https://issues.apache.org/jira/browse/HADOOP-10573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13989835#comment-13989835
 ] 

Colin Patrick McCabe commented on HADOOP-10573:
-----------------------------------------------

Thanks for looking at this, Wenwu.  I would rather keep cmake 2.6 working, 
since RHEL 6 still uses that version.
{code}
[cmccabe@vm7 ~]$ cat /etc/issue
CentOS release 6.4 (Final)
Kernel \r on an \m
[cmccabe@vm7 ~]$ cmake -version
cmake version 2.6-patch 4
{code}

Instead, how about doing this, which will still work under cmake 2.6?
{code}
diff --git a/hadoop-native-core/GenerateProtobufs.cmake 
b/hadoop-native-core/GenerateProtobufs.cmake
index 262720e..3b69764 100644
--- a/hadoop-native-core/GenerateProtobufs.cmake
+++ b/hadoop-native-core/GenerateProtobufs.cmake
@@ -52,7 +52,7 @@ function(DECLARE_PROTOS OUTPUT_SRC_LIST GENERATOR_DIR 
INCLUDE_DIRS)
     set(${OUTPUT_SRC_LIST} ${CFILES} ${HFILES} PARENT_SCOPE)
 endfunction()
 
-get_filename_component(R "${CMAKE_CURRENT_LIST_DIR}/.." REALPATH)
+get_filename_component(R "${PROJECT_SOURCE_DIR}/.." REALPATH)
 
 # Common protobuf files.  In general, the other subprojects such as HDFS and
 # YARN may rely on definitions in these protobuf files.
{code}

> Pure Native Client:Correct Cmake version
> ----------------------------------------
>
>                 Key: HADOOP-10573
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10573
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: native
>    Affects Versions: HADOOP-10388
>            Reporter: Wenwu Peng
>            Assignee: Wenwu Peng
>         Attachments: HADOOP-10573.1.patch
>
>
> In GeneratProtobufs.cmake, use variable CMAKE_CURRENT_LIST_DIR, it is new for 
> cmake version 2.8, so we should change cmake_minimum_required(VERSION 2.6) to 
> (VERSION 2.8) in CMakeLists.txt



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to