[CMake] Cmake 3.5.0 and Fortran submodule cannot be built

Brad King brad.king at kitware.com
Thu Mar 24 15:32:45 EDT 2016


On 03/24/2016 03:29 PM, olusegun ogunbade wrote:
> [ 33%] Building Fortran object src/CMakeFiles/foo.dir/m_point.f90.o 
> Error copying Fortran module "mod/procedure".  Tried "mod/PROCEDURE.mod" and "mod/procedure.mod". 

Thanks for the example.  The problem is that the syntax

    MODULE PROCEDURE point_dist

tricks CMake into parsing "MODULE PROCEDURE" as if it were
a declaration of a module called "procedure".  Unfortunately
this is not just a matter of excluding that name because it
also appears to be valid to really define a module named
"procedure".

I still need to look into this further to determine how to
fix it.  CMake's approximate Fortran parser will need to be
updated to account for submodule syntax.

-Brad



More information about the CMake mailing list