-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathfpm.toml
106 lines (100 loc) · 4.14 KB
/
fpm.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# TOML file for fpm as described at https://fpm.fortran-lang.org/en/spec/manifest.html
name = "M_strings"
version = "2.0.0"
license = "CC0-1.0"
author = "John S. Urban"
maintainer = "[email protected]"
copyright = "2020 John S. Urban"
description = "string manipulation"
categories = ["strings"]
keywords = ["fortran", "strings"]
homepage = "https://github.com/urbanjost/M_strings.git"
[build]
auto-executables = true
auto-tests = true
auto-examples = true
# new force module naming rules to avoid collisions with other packages
module-naming = true
# traditional where user can use any module name
#module-naming = false
# new
[fortran]
implicit-typing = false
implicit-external = false
source-form = "free"
#
# traditional pre-version8 compatibility
#implicit-typing = true
#implicit-external = true
#source-form = "default"
# demo programs
[install]
library=true
[[executable]]
name = "b64"
source-dir = "app"
main = "b64.f90"
[[executable]]
name = "shake_strings"
source-dir = "app"
main = "main.f90"
[executable.dependencies]
[executable.dependencies.M_io]
git = "https://github.com/urbanjost/M_io.git"
#namespace = "GPF"
#path = "GLINKS/M_io"
[executable.dependencies.M_CLI2]
git = "https://github.com/urbanjost/M_CLI2.git"
#namespace = "GPF"
#path = "GLINKS/M_CLI2"
[[test]]
name="test_suite"
source-dir="test"
main="test_suite_M_strings.f90"
[test.dependencies]
# can use various registries, including local mirrors
#M_framework = { namespace = "GPF" }
#
# regular internet connection or possibly an internal network
M_framework = { git = "https://github.com/urbanjost/M_framework.git" }
#
# For off-line work I use the GLINKS directory with links to many packages
# I have or use offline
# ln -f -s $HOME/github/GLINKS GLINKS
# NOTE: some filesystems, particularly those found on off-the-shelf external
# drives and some OSes may not support directory links, even soft links
# Even if supported they might be platform specific and need regenerated
# (scripts may be useful).
#M_framework = { path = "GLINKS/M_framework" }
# ISSUE: wanting to switch automatically between dependency sorces:
# conditional logic and/or a preprocessor can be used, as can be scripts
# to read in the fpm.toml file and rewrite it, but trying to use a
# pure TOML approach first as a minimalist approach -- can fpm have
# an --offline/--online/--registry switch or some other indication of
# which depdendencies to use?; or allow redundant ones and go through
# them from top to bottom?
# now with recent improvements to registries, could use a local registry mirror
# for packages in a registry, but can local packages be added to a local registry (yet?)
#
# There are also copies of dependencies in the build/ directories subject to the clean(1)
# subcommand; and I find that a full clean is required to switch between different
# dependency locations;
#
# Note that using a soft link to a directory like GLINK probably subverts the requirement
# that the local dependencies in a "path" are contained in the project area (to promote
# the project being self-contained?). It would be slightly easier to point to directories
# by relative or full pathnames although that is fraught with other potential complications.
#
# another approach is to install libraries which many dependencies produce and use the libraries
# normally. This allows for flexible compilation of each library and greatly reduces duplicate
# compilation of the same dependencies but means if the package is distributed to other platforms
# that the libraries all need built there as well.
#
# A standard preprocessor for Fortran that could also be applied to files like fpm.toml might be
# useful.
#
# An in-production registry would help
#
# check on if registry can be build from local packages but if not a public registry if you
# distribute your package you have to maintain a public mirror of the registry or others cannot
# build your package without recreating the local registry contents needed.