<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 14 (filtered medium)">
<link rel="Stylesheet" type="text/css" media="all" href="mailoffice.css"><style><!--
/* Font Definitions */
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","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
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
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.EmailStyle18
        {mso-style-type:personal-compose;
        font-family:"Arial","sans-serif";
        color:black;}
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;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</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" id="notables">
<div class="WordSection1">
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">Hi Nikolaus,<o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black"><o:p> </o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">I think the parser for Fortran sources indeed does not take care of such conditionals (they are also compiler-dependent, COCO never really
 got off the ground). A workaround might be to define a dummy module by that name.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">As for the selection of the Fortran compiler, you might check the name of the compiler once it has been found and if it is not the one you support, issue an informative
 message.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">Arjen<br>
<br>
</span><o:p></o:p></p>
<p><span style="font-size:10.0pt">> -----Original Message-----<br>
> From: CMake [<a href="mailto:cmake-bounces@cmake.org">mailto:cmake-bounces@cmake.org</a>] On Behalf Of Nikolaus Rath<br>
> Sent: Friday, May 01, 2015 12:05 AM<br>
> To: CMake<br>
> Subject: [CMake] Problem with Fortran conditionals<br>
><br>
> Hello,<br>
><br>
> I am in the process of converting a bigger project from pure GNU Make to CMake -<br>
> mostly because managing dependencies for the Fortran sources has become too<br>
> painful.<br>
><br>
> Things seem to be mostly working, but I'm hitting one problem. When trying to run<br>
> the (CMake-generated) Makefile, it fails with:<br>
><br>
> $ make VERBOSE=1<br>
> [...]<br>
> make[2]: Entering directory `/home/nrath/Q2D/LamyRidge/src/model/build'<br>
> /home/nrath/.local/stow/cmake/bin/cmake -E cmake_copy_f90_mod<br>
> dagmg_allroutines CMakeFiles/LR_model.dir/dagmg_allroutines.mod.stamp Intel<br>
> /home/nrath/.local/stow/cmake/bin/cmake -E cmake_copy_f90_mod dagmg_mem<br>
> CMakeFiles/LR_model.dir/dagmg_mem.mod.stamp Intel<br>
> /home/nrath/.local/stow/cmake/bin/cmake -E cmake_copy_f90_mod dagmg_pardiso<br>
> CMakeFiles/LR_model.dir/dagmg_pardiso.mod.stamp Intel Error copying Fortran<br>
> module "dagmg_pardiso".  Tried "DAGMG_PARDISO.mod"<br>
> and "dagmg_pardiso.mod".<br>
> make[2]: ***<br>
> [CMakeFiles/LR_model.dir/home/nrath/Q2D/LamyRidge/src/comm/agmg-<br>
> seq/dagmg.f90.o.provides.build]<br>
> Error 1<br>
> make[2]: Leaving directory `/home/nrath/Q2D/LamyRidge/src/model/build'<br>
> make[1]: *** [CMakeFiles/LR_model.dir/all] Error 2<br>
> make[1]: Leaving directory `/home/nrath/Q2D/LamyRidge/src/model/build'<br>
> make: *** [all] Error 2<br>
><br>
> I am not sure why CMake is trying to copy module files around, but when I looked at<br>
> the file that provides the "dagmg_pardiso" module, I found this code:<br>
><br>
> !DEC$ IF DEFINED(_MKL_)<br>
>   MODULE dagmg_PARDISO<br>
>     USE dagmg_PARDISSO<br>
>     INTERFACE<br>
>  [...]<br>
>     END INTERFACE<br>
>   END MODULE dagmg_PARDISO<br>
> !DEC$ ENDIF<br>
> !-----------------------------------------------------------------------<br>
> !DEC$ IF .NOT. DEFINED(_MKL_)<br>
>     SUBROUTINE PARDISO( PT, MAXFCT, MNUM, MTYPE, PHASE, N, A, IA, JA<br>
> &<br>
>          , PERM, NRHS, IPARM, MSGLVL, B, X, ERROR ) [...]<br>
>      END SUBROUTINE PARDISO<br>
> !DEC$ ENDIF<br>
><br>
> I do not define __MKL__. Is it possible that the CMake dependency parser doesn't<br>
> understand this way of defining conditionals, and thus looks for a module that does<br>
> not exist?<br>
><br>
> If so, what would be the best way to work around this?<br>
><br>
> (The code is from a third-party library, so unfortunately I cannot easily change it).<br>
><br>
><br>
> Best,<br>
> -Nikolaus<br>
> --<br>
><br>
> Powered by www.kitware.com<br>
><br>
> Please keep messages on-topic and check the CMake FAQ at:<br>
> <a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
><br>
> Kitware offers various services to support the CMake community. For more<br>
> information on each offering, please visit:<br>
><br>
> CMake Support: <a href="http://cmake.org/cmake/help/support.html">http://cmake.org/cmake/help/support.html</a><br>
> CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html">http://cmake.org/cmake/help/consulting.html</a><br>
> CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html">http://cmake.org/cmake/help/training.html</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://public.kitware.com/mailman/listinfo/cmake">http://public.kitware.com/mailman/listinfo/cmake</a></span><o:p></o:p></p>
</div>
DISCLAIMER: This message is intended exclusively for the addressee(s) and may contain confidential and privileged information. If you are not the intended recipient please notify the sender immediately and destroy this message. Unauthorized use, disclosure
 or copying of this message is strictly prohibited. The foundation 'Stichting Deltares', which has its seat at Delft, The Netherlands, Commercial Registration Number 41146461, is not liable in any way whatsoever for consequences and/or damages resulting from
 the improper, incomplete and untimely dispatch, receipt and/or content of this e-mail.
</body>
</html>