<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.5pt;
        font-family:Consolas;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:Consolas;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 92.4pt 72.0pt 92.4pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="2050" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-GB link=blue vlink=purple>
<div class=Section1>
<p class=MsoPlainText><span lang=EN-US>First off, I'd like to say thanks to
whoever is responsible for the huge improvements in Fortran support in cmake-1.8.0.
I've got most of the hdf5 Fortran testing framework essentially running
smoothly on win32 intel visual fortran 11.x - no changes necessary to the
default Fortran flags and detection stuff in cmake (that’s close to a
miracle!). <o:p></o:p></span></p>
<p class=MsoPlainText><span lang=EN-US style='color:black'><o:p> </o:p></span></p>
<p class=MsoPlainText><span lang=EN-US style='color:black'>However, the same cmake
code gave me link errors under linux, so I tried to get the name mangling right
using<o:p></o:p></span></p>
<p class=MsoPlainText><span lang=EN-US style='color:black'><o:p> </o:p></span></p>
<p class=MsoPlainText><span lang=EN-US style='color:black'>include(FortranCInterface)<o:p></o:p></span></p>
<p class=MsoPlainText><span lang=EN-US style='color:black'>FortranCInterface_HEADER(${HDF5Fortran_BINARY_DIR}/FCMangle.h<o:p></o:p></span></p>
<p class=MsoPlainText><span lang=EN-US style='color:black'>
MACRO_NAMESPACE "H5_FC_FUNC_"<o:p></o:p></span></p>
<p class=MsoPlainText><span lang=EN-US style='color:black'>
SYMBOL_NAMESPACE "H5_FC_SYM_"<o:p></o:p></span></p>
<p class=MsoPlainText><span lang=EN-US style='color:black'>
SYMBOLS mysub mymod:my_sub)<o:p></o:p></span></p>
<p class=MsoPlainText><span lang=EN-US style='color:black'><o:p> </o:p></span></p>
<p class=MsoPlainText><span lang=EN-US style='color:black'>Which works out of
the box under linux (intel fortran, will try PGI/Cray etc later). Superb job with
the detection. Really nice, even gets the module prefixes and stuff right (module_mp_func
etc).<o:p></o:p></span></p>
<p class=MsoPlainText><span lang=EN-US style='color:black'><o:p> </o:p></span></p>
<p class=MsoPlainText><span lang=EN-US style='color:black'>However, for unknown
reasons, when I use this code on the win32 machine which is compiling the
primary fortran projects happily, this happens<o:p></o:p></span></p>
<p class=MsoPlainText><span style='color:black'><img width=291 height=101
id="Picture_x0020_1" src="cid:image003.jpg@01CA6DAE.1B56F060"></span><span
lang=EN-US style='color:black'><o:p></o:p></span></p>
<p class=MsoPlainText><span lang=EN-US style='color:black'><o:p> </o:p></span></p>
<p class=MsoPlainText><span lang=EN-US style='color:black'>Now if I click
through saying Yes, Yes, Yes, several times, the intermediate solution/project
files do get loaded behind the scenes and the name mangling is correctly
detected. But if I say No, then the try_compile phase is skiped and detection
fails. (And if I navigate to the binary dir where the solution files are being
created and load the projects manually, the same error is displayed)<o:p></o:p></span></p>
<p class=MsoPlainText><span lang=EN-US style='color:black'><o:p> </o:p></span></p>
<p class=MsoPlainText><span lang=EN-US style='color:black'>The question is, why
is/are the solution files being corrupted when running in the CFortranInterface
try compile stages – when other projects are generated correctly.<o:p></o:p></span></p>
<p class=MsoPlainText><span lang=EN-US style='color:black'><o:p> </o:p></span></p>
<p class=MsoPlainText><span lang=EN-US style='color:black'>I will do some
digging to try to uncover the problem, but if someone on the core cmake team
can guess what’s wrong (and fix it), then thanks in advance.<o:p></o:p></span></p>
<p class=MsoPlainText><span lang=EN-US style='color:black'><o:p> </o:p></span></p>
<p class=MsoPlainText><span lang=EN-US style='color:black'>JB<o:p></o:p></span></p>
</div>
</body>
</html>