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

Alan Burlison commented on HADOOP-12036:
----------------------------------------

I've attached a prototype refactoring of common code from both hadoop-common 
and other CMakeList.txt files that duplicate code from hadoop-common into two 
new files:

* HadoopCommon.cmake - this contains common configuration (e.g. compiler flags) 
as well as common macros and functions. I've prefixed all the macros and 
functions with "hadoop_" to make them easier to spot in any CMakeList.txt files 
that use them
* HadoopJNI.cmake - this contains the JNI configuration code, with specific 
sections for Linux and Solaris

This isn't fully tested so I'm not submitting it as a patch but I did want to 
get feedback on the overall approach before going too far down this path. In my 
updated CMakeLists.txt or hadoop-common I include HadoopCommon.cmake at the 
start of the file:

{quote}
list(APPEND CMAKE_MODULE_PATH $\{CMAKE_SOURCE_DIR}/..)
include(HadoopCommon)
{quote}

Then after setting the compiler flags etc appropriately I include HadoopJNI to 
configure the JNI settings.

> Consolidate all of the cmake extensions in one directory
> --------------------------------------------------------
>
>                 Key: HADOOP-12036
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12036
>             Project: Hadoop Common
>          Issue Type: Sub-task
>            Reporter: Allen Wittenauer
>            Assignee: Alan Burlison
>         Attachments: prototype01.txt
>
>
> Rather than have a half-dozen redefinitions, custom extensions, etc, we 
> should move them all to one location so that the cmake environment is 
> consistent between the various native components.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to