Skip to content

Cannot Find Modules in Subdirectories of Tests or Executables #408

@everythingfunctional

Description

@everythingfunctional

If there are modules in sub-directories of a test or executable, fpm reports that it cannot find them.

[pop-os:~/tmp/test_subdirectories] tree
.
├── app
│   ├── main.f90
│   └── sub
│       └── file.f90
├── fpm.toml
├── README.md
├── src
│   └── test_subdirectories.f90
└── test
    ├── check.f90
    └── sub
        └── something.f90

5 directories, 7 files
[pop-os:~/tmp/test_subdirectories] fpm run
 + mkdir -p build/dependencies
Unable to find source for module dependency: "thing_m" used by "app/main.f90"
ERROR STOP 1

Error termination. Backtrace:
#0  0x47eb9d in ???
#1  0x47ee35 in ???
#2  0x47fdde in ???
#3  0x406276 in __fpm_MOD_cmd_run
	at src/fpm.f90:226
#4  0x400890 in MAIN__
	at app/main.f90:28
#5  0x400890 in main
	at app/main.f90:9
[pop-os:~/tmp/test_subdirectories] fpm test
Unable to find source for module dependency: "thing_m" used by "app/main.f90"
ERROR STOP 1

Error termination. Backtrace:
#0  0x47eb9d in ???
#1  0x47ee35 in ???
#2  0x47fdde in ???
#3  0x406276 in __fpm_MOD_cmd_run
	at src/fpm.f90:226
#4  0x400861 in MAIN__
	at app/main.f90:30
#5  0x400861 in main
	at app/main.f90:9

I was under the impression that this was meant to work.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions