Open MarDiehl opened 3 years ago
The only thing that currently stops fpm from building this project is the configure_file
for the os.name
if we had a preprocessor based replacement it would be fpm compatible without further effort.
ok, I'll fix that
should work now. Is the repository now in a state to go ahead with fpm? I think from my side documentation and testing are currently the most important aspects and I will work on that.
Cool I will test later today and report back how well it goes. One thing in advance, better namespacing for the modules would be great, how about a stdlib_
prefix?
One last thing to note is that fpm currently has limited support for source file includes which I notice are used here (reintroduced in 53ec42f616a3e4978f95ed5a143ba7ff39d580bf and 59501013fdf8798b5323e91589307b824914376c). Specifically:fpm cannot yet track module dependencies in included files; fpm incremental rebuilds do not track changes in included files and included file cannot have the .f90
suffix. I am currently working on an update to fpm to address these shortcomings.
For this repository it should be sufficient to either not use include
or to rename the include
files as *.inc
or similar.
nice. Namespaces in Fortran are a little bit annoying because everything needs to be hard coded. To avoid pollution of the stand alone version, I wanted to use a small shim that does something like
use os_path, only: &
stdlib_os_path_abspath => abspath
for fpm/stdlib
I was more thinking about the module names os
-> stdlib_os
and os_path
-> stdlib_os_path
.
One last thing to note is that fpm currently has limited support for source file includes which I notice are used here (reintroduced in 53ec42f and 5950101). Specifically:fpm cannot yet track module dependencies in included files; fpm incremental rebuilds do not track changes in included files and included file cannot have the
.f90
suffix. I am currently working on an update to fpm to address these shortcomings.For this repository it should be sufficient to either not use
include
or to rename theinclude
files as*.inc
or similar.
so renaming os_path_windows.f90
to os_path_windows.f90.inc
and os_path_posix.f90
to os_path_posix.f90.inc
would work?
Does fpm track changes in the C code, or would you simply assume that it is static? In the current case, this is a reasonable assumption (at it is fpm, not cpm).
Yep that renaming will work and yes fpm does track changes in *.c
files (but not *.h
yet).
I was more thinking about the module names
os
->stdlib_os
andos_path
->stdlib_os_path
.
that's fine with me if file names are also adjusted.
As far as I remember, fpm does not work (yet) with cmake. Would it be sufficient to provide a static, hand-written makefile for the beginning?