Skip to content

Consistent module / include search paths #441

Closed
@awvwgk

Description

@awvwgk

Just found this Q&A here: https://stackoverflow.com/questions/23991664/gfortran-include-path-is-there-an-alternative-to-passing-multiple-i-options

In summary, GFortran will not use the CPATH environment variable to resolve Fortran include or use directives, the -I flag has to be manually added with -I to the command line. In contrast, #include via the C preprocessor will use the include directories from CPATH.

With Intel Fortran the situation is different, include, use and #include will use the directories specified in CPATH to find include files and module files.

For consistency (and convenience), I would suggest we “fix” the GFortran behaviour by automatically adding the entries in CPATH as include directories to the compile arguments to allow the user to rely on the environment variables rather than having to use --flag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions