-
Notifications
You must be signed in to change notification settings - Fork 111
Description
Since #438, it's possible to use external (non-fpm packaged) modules as dependencies.
There are currently two possible ways to do this:
- Pass the path explicitly via
--flag
, e.g.:
fpm build --flag "-I/path/to/my/external/dependencies"
- Link all modules into a
include
(default) directory and let fpm pick them up.
Option 1 is verbose and error-prone, especially when you start to include more than one non-fpm dependency into the project. It's particularly bad during development when I want to type fpm build
often.
Option 2 is much easier but inelegant. It's difficult to manage different versions of dependencies or dependencies built by different compilers (both are common use cases in my field) because you'd need to replace the files or symlinks.
Rather than managing the external dependency modules on a file system level, I suggest to introduce an fpm-specific environment variable to pass the paths to the compiler.
Originally proposed by @LKedward here. A candidate variable name, proposed by @certik here, is FPM_EXTERNAL_MODULES_PATH
. Which I like as well.
#444 would solve this (variable name aside), but it turns out it was trying to solve something else.