On 03/24/2016 03:32 PM, Brad King wrote: > CMake's approximate Fortran parser will need to be > updated to account for submodule syntax.
I don't know if/when I'll have time to look at this myself. If anyone is interested in working on it, please come to the [developer list](https://cmake.org/mailman/listinfo/cmake-developers) to discuss more details. For reference, submodules are summarized [here](http://fortranwiki.org/fortran/show/Submodules). The parser is in Source/cmFortranParser.y in the CMake source tree. There are a few problems currently: * Submodules introduce a new syntax module function point_dist(a, b) result(distance) Currently CMake parses the "module function" part and thinks there is a module called "function". We cannot simply exclude this name because it is valid to define such a module normally. The parser may have to learn more about the structure of Fortran sources to distinguish true module definitions from these new "module function" and "module procedure" definitions within a module. At least it may need to track the opening/closing of modules (module foo ... end). * The submodule syntax submodule (points) points_a can be used to define the "points" module with no explicit "module points", as shown on the fortranwiki page. CMake will need to learn this syntax. * It needs to be determined whether there are cases that CMake's dependency scanning needs to be aware of the ".smod" files. -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake