<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.3086" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi, I use cmake under windows, with both gfortran 
(gnu fortran)&nbsp;and ifort (intel fortran)&nbsp;compilers.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I have found some problems that I would like to put 
at your attention.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>1) the default intel fortran installation set two 
environment variables FFLAGS and F90FLAGS, with the following 
value:</FONT></DIV>
<DIV><FONT face=Arial size=2>/w /I:"C:\Programmi\VNI\CTT6.0\include\IA32" /fpe:3 
/nologo.</FONT></DIV>
<DIV><FONT face=Arial size=2>I found that cmake have problems when it tests if 
the ifort compiler works. It seems to be a problem in the path format. In fact, 
a possible solution is to remove the /I:"C:\Programmi\VNI\CTT6.0\include\IA32" 
part from the variable. Otherwise it is possible to use se folowing cmake 
command:</FONT></DIV>
<DIV><FONT face=Arial size=2>FILE(TO_CMAKE_PATH $ENV{F90FLAGS} 
CMAKE_Fortran_FLAGS)</FONT></DIV>
<DIV><FONT face=Arial size=2>However, in this case, the first time §I call cmake 
it still fails, while the following times it works.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>2) Since I have two fortran compilers installed, 
sometimes I chose to use gfortran and sometimes ifort.</FONT></DIV>
<DIV><FONT face=Arial size=2>However, If I use the following commands in this 
order:</FONT></DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>PROJECT (hello Fortran)</FONT></DIV></FONT></DIV>
<DIV><FONT face=Arial size=2>SET (CMAKE_Fortran_COMPILER gfortran)</FONT></DIV>
<DIV><FONT face=Arial size=2>cmake still tests ifort working when creating the 
makefile.</FONT></DIV>
<DIV><FONT face=Arial size=2>The only whay to have cmake make use only of 
gfortran is to use the commands in the following order:</FONT></DIV>
<DIV><FONT face=Arial size=2>
<DIV>
<DIV><FONT face=Arial size=2>SET (CMAKE_Fortran_COMPILER gfortran)</FONT></DIV>
<DIV>PROJECT (hello Fortran)</DIV>
<DIV>I think it would be better that cmake set the right compiler also in the 
first case, also because the required order is not specified in the cmake 
documentation.</DIV>
<DIV>&nbsp;</DIV>
<DIV>3) When I build my project with ifort (which makes use of the microsoft 
linker) at the EXECUTABLE_OUTPUT_PATH, i get a hello.ilk file together with the 
hello.exe file (the ilk file is a Microsoft Linker Database).</DIV>
<DIV>&nbsp;</DIV>
<DIV>Bye,</DIV>
<DIV>Luca</DIV>
<DIV>&nbsp;</DIV></DIV></FONT></DIV></BODY></HTML>