alashworth / test-issue-import

0 stars 0 forks source link

Stan programs with includes - compiler should output list of paths to includes for make #146

Open alashworth opened 5 years ago

alashworth commented 5 years ago

Issue by mitzimorris Wednesday Jun 14, 2017 at 00:08 GMT Originally opened as https://github.com/stan-dev/stan/issues/2324


Summary:

Follow-up functionality for Feature/2224 stan includes, from comment https://github.com/stan-dev/stan/pull/2289#issuecomment-299261361

generate a separate file with the include files

Proposal is to generate a list of files like this:


main.stan
foo/bar/baz.stan
...
with one relative path per file (the relative paths of the includes will be based on however they're found)? It will require us to take another argument to the compiler and parser in the form of a std::ostream& and the files will be written one per line in ASCII with forward-slashes as delimeters (or whatever might have been input if it's mixed on Windows) terminated by \n with a final \n.

To be used by the makefile in CmdStan to only build the executable when something in the list of files has changed.

#### Current Version:
v2.15.0