[CMake] CMake newbie Fortran question

Bill Hoffman bill.hoffman at kitware.com
Thu Mar 20 08:45:11 EDT 2008


Asmae Houda wrote:
> Hello,
> 
> I have a Fortran90 project which was managed through GNU makefiles, and 
> would like to switch to CMake.
> 
> All the .f90 files are located in one directory, let's say 'src'. My 
> CMakeLists.txt file is as follows:
> 
> # project declaration
> project (myExe Fortran)
> add_executable (myExe file_1.f90 file_2.f90 ... file_n.f90)
> 
> Under my Linux box, I set the Fortran compiler environment to Intel 
> Fortran 10 with the command 'export FC=ifort', then just typing 'cmake 
> .' gives:
> -- Check for working Fortran compiler: 
> /usr/local/intel/fc/10.1.008/bin/ifort
> -- Check for working Fortran compiler: 
> /usr/local/intel/fc/10.1.008/bin/ifort -- works
> -- Checking whether /usr/local/intel/fc/10.1.008/bin/ifort supports 
> Fortran 90
> -- Checking whether /usr/local/intel/fc/10.1.008/bin/ifort supports 
> Fortran 90 -- yes
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /home/user/F_project/src
> 
> Then while trying to build the project with 'make' I got the following 
> stalling output:
> Scanning dependencies of target myExe
> 
> and the make process do not go beyond this !
> So, what's going wrong in my project? Anybody could help ...
> I use CMake version 2.4-patch 6 (precompiled under Ubuntu 7.1)
> 
Try CMake 2.4.8, I am pretty sure it fixes these issue.  CVS CMake is 
much better at fortran, but 2.4.8 should fix this issue.

-Bill


More information about the CMake mailing list