Workflow for project with fpm (fpm build/install vs run with input files)

The -C/--directory option specifies the root directory of the project that fpm should build/run/etc., so that one can build/run a project without first having to move to it. But if one then wants the working directory to be something other than the root of the project before launching an executable, we currently don’t have an option for that.

For example, fpm run --example -C /path/to/my_project -W /path/to/my_project/example_inputs would, regardless of current working directory, run the example executable for my_project, but before doing so, set the CWD to the example_inputs directory in that project, because presumably the program looks for input files in CWD. I would certainly make use of such a feature in some projects, especially if I could set a default in the fpm.toml file.

1 Like

OK. Slightly different workflow issues. From @sideboard’s description and what I currently do myself and @certik’s build/bin description I was thinking the simplest usage would be something like this proposal for a new activate command. Allowing working directories, especially allowing for a default in a configuration file would also work for a few other workflow models.

2 Likes

Hi everyone. What are the current recommendations for OP’s question? Are there any new changes since the last post that streamline the workflow?