<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr" style="font-size:14pt;color:#000000;background-color:#FFFFFF;font-family:Arial,Helvetica,sans-serif;">
<p><br>
</p>
<p>Hello,</p>
<p><br>
</p>
<p>I ran into three issues while building MOAB with CMake and my own hdf5:</p>
<p><br>
</p>
<p>1.)</p>
<p><br>
</p>
<p>   Although I had a version of hdf5 library on my PC (apt-get install ...), I was trying to get MOAB to build using CMake with the hdf5 from the one that I had built. It continued to pick up the system version, despite all of my efforts to get it not to.</p>
<p><br>
</p>
<p>I was getting messages like:<br>
</p>
<p><br>
</p>
<p><em>CMake Warning at test/CMakeLists.txt:129 (add_executable):</em><br>
<em>  Cannot generate a safe runtime search path for target mbcn_test because</em><br>
<em>  files in some directories may conflict with libraries in implicit</em><br>
<em>  directories:</em><br>
<br>
<em>    runtime library [libhdf5.so.7] in /usr/lib/x86_64-linux-gnu may be hidden by files in:</em><br>
<em>      /ascldap/users/pakuber/hdf5/lib</em><br>
<br>
<em>  Some of these libraries may not be found correctly.</em><br>
<br>
</p>
<p>and this was resulting in bad builds (the system version wasn't parallel).</p>
<p><br>
</p>
<p>I fixed defaulting to the system version of hdf5 by amending the line in FindHDF5_MOAB.cmake to:find_package(HDF5 COMPONENTS C HL
<strong>NO_DEFAULT_PATH</strong>) <br>
</p>
<p><br>
</p>
<p>2.) After fixing the libraries, with #1 and ensuring that I get the libraries that I'm trying to use, I found that FindHDF5_MOAB.cmake was not assigning the CMake variable HDF5_INCLUDES, which caused CMake errors.
<br>
</p>
<p><br>
</p>
<p>Rebuilding hdf5 with CMake, I observed that despite finding my hdf5-config.cmake, I needed to add the line:</p>
<p>SET( HDF5_INCLUDES "${HDF5_INCLUDE_DIR}" )</p>
<p>to FindHDF5_MOAB.cmake <br>
</p>
<p><br>
</p>
<p>as can be seen in the attached diff.patch file.</p>
<p><br>
</p>
<p>3.) In config/MOABConfig.cmake.in,</p>
<p><br>
</p>
<p>in line 28 and 78 @HDF5_DIR@ is used, but in config/MOABConfig.cmake.cmake, </p>
<p>line 28 is replaced by @HDF5_ROOT@ while line 78 remains @HDF5_DIR@, causing build errors.<br>
</p>
<p><br>
</p>
<p>This is also address in the attached patch file.</p>
<p><br>
</p>
<p>Take care,</p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<font size="2"><font face="Arial,Helvetica,sans-serif">---------------------------------------------</font><br>
</font>
<p class="MsoNormal"><font size="4" face="Arial,Helvetica,sans-serif"><span style="color:black">Paul Kuberry</span></font></p>
<font size="2"></font>
<p class="MsoNormal"><font size="3" face="Arial,Helvetica,sans-serif"><span style="color:black">Sandia National Laboratories</span></font></p>
<font size="3"><font face="Arial,Helvetica,sans-serif">P.O. Box 5800, Mailstop 1320<br>
Albuquerque, NM 87123-1320<br>
(505) 844-3668</font></font><br>
</div>
</div>
</body>
</html>