[CMake] feedback on fortran support
Daniel Franke
franke.daniel at gmail.com
Tue Dec 2 17:31:13 EST 2008
Hi all.
After years of automake, I only recently starting looking into CMake. Setting
up a multi-language project (C/C++/Fortran) was simple and everything just
works. Impressive!
Two nitpicks/suggestions:
1.
As CheckCSourceCompiles and CheckCXXSourceCompiles macros are available, one
would expect a CheckFortranSourceCompiles (and CheckFortranSourceRuns and
CheckFortranCompilerFlag and ...), but they are missing. Deriving the
respective macro for Fortran based on the C/C++ files was very easy, so it's
attached to this mail. Any chance to include it (or something like it) in the
next release?
2.
Fortran does not have any concept of preprocessing. However, by convention,
files with a capital suffix (.F, .FOR, .FPP, .F90, F03, ...) are preprocessed,
usually by a C-preprocessor. CMake does not take this into account and passes
commandline definitions to any kind of fortran file. This is not exactly a
bug, but maybe slightly inefficient.
Keep up the good work :)
Thanks
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CheckFortranSourceCompiles.cmake
Type: text/x-cmake
Size: 2680 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081202/2c0df773/attachment-0001.bin>
More information about the CMake
mailing list