<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000'>If you want it to find a particular compiler always, you should do:<br><br>FC=<ifort or gfortran> cmake ...<br><br>In other words, set the FC environment variable to the desired compiler.<br><br>Likewise, FindMPI will find the first mpicc on your path. If that happens to be the ifort one, that's what you will get. If you have multiple compilers and multiple MPI installations, you might be better off installing the module system (http://linux.die.net/man/1/module) that is commonly used on HPC systems. This way you can ensure that only one installation of what you want is in your environment, and then you don't need to worry about manually setting things or putting things in your path in a particular order.<br><br>Tim<br><br><hr id="zwchr"><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Eli Ateljevich" <eli@water.ca.gov><br><b>To: </b>"CMake List" <cmake@cmake.org><br><b>Sent: </b>Monday, July 2, 2012 5:20:34 PM<br><b>Subject: </b>[CMake] cmake 2.6 and 2.8 find different fortran compilers with MPI?<br><br><style><!--
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        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.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
@list l0
        {mso-list-id:1693603800;
        mso-list-type:hybrid;
        mso-list-template-ids:1530062856 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><div class="WordSection1"><p class="MsoNormal">Hi, </p><p class="MsoNormal">I wonder if anyone can help me get a consistent Fortran build out of 2.6 and 2.8.8. I am using CMake 2.6 and 2.8, trying to come up with a compatible build. I had to rob some items from 2.8 to find things like MPI correctly and I have set the policies such that I believe they both use the same FindMPI.cmake.</p><p class="MsoNormal"> </p><p class="MsoNormal">For some reason, my 2.6 installation “magically” found the Intel compiler ifort. I never did a set(CMAKE_Fortran_COMPILER). Version 2.8.8 does not do this and defaults to gfortran. The later FindMPI finds an Intel wrapper, not the gfortran version.</p><p class="MsoNormal"> </p><p class="MsoNormal">Was this a bug fix or policy change?</p><p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman""> </span></span> If this is a policy, can I manipulate it to make the two builds compatible</p><p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman""> </span></span>What can I do about making the compiler and FindMPI consistent in general,</p><p class="MsoNormal"> </p><p class="MsoNormal">Thanks very much,</p><p class="MsoNormal">Eli</p></div><br>--<br><br>Powered by www.kitware.com<br><br>Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html<br><br>Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ<br><br>Follow this link to subscribe/unsubscribe:<br>http://www.cmake.org/mailman/listinfo/cmake</div><br></div></body></html>