[CMake] Spurious test failure in CMakeTestFortranCompiler

Neil Carlson neil.n.carlson at gmail.com
Sun Jun 30 23:10:36 EDT 2013


I've run into a problem with CMakeTestFortranCompiler reporting that the
Fortran compiler does not support Fortran 90, when in fact it does.  I've
set CMake_Fortran_FLAGS at the outset to include the "-u" flag which has
the effect of making "implicit none" the default (this is the NAG compiler,
but other compilers have a similar option and the result is the same).
 Unfortunately, the little code snippets that CMakeTestFortranCompiler uses
rely on the implicit typing and so the compiles fail.

Why is that module using CMake_Fortran_FLAGS at all?  Shouldn't it be
invoking the bare compiler when it runs its tests?  Or am I misusing
CMake_Fortran_FLAGS?  Should I be defining its value at a later stage in
the cmake files?

Thanks for your advice,
  Neil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130630/4bd9ce47/attachment.htm>


More information about the CMake mailing list