Brian Dolan
Brian Dolan

Reputation: 3136

How does Chapel handle "includes"

Now, if I have two Chapel projects ProjA and ProjB.

If I want to use ProjA in B, I include the -M/path/to/ProjA flag in my . In however, the paradigm is often to include whole libraries, like boost, that are install system-wide. What is the analog to this in Chapel. Is there a chpl --compile-as-system-library flag or something?

Upvotes: 2

Views: 72

Answers (1)

ben-albrecht
ben-albrecht

Reputation: 1865

What is the analog to this in Chapel. Is there a chpl --compile-as-system-library flag or something?

If I'm understanding correctly, you can accomplish this by setting CHPL_MODULE_PATH to a designated common library path, and putting the Chapel modules into that directory. This will remove the constraint of adding -M flags to all your compilations, e.g.

> export CHPL_MODULE_PATH=/path/to/ProjA
> chpl B.chpl

In the long term, Mason won't solve this problem exactly. According to current design plans, Mason will only manage dependencies on a package basis, so it won't have the ability to make packages available system-wide without specifying the dependencies in the package manifest file.

Upvotes: 2

Related Questions