There are two ways to reduce the dependencies in CMT:
- put the "use" statement in a private section
- append the qualifier -no_auto_imports
We need to consider both compile/link time dependencies, and run-time. Many packages, like flux, have xml files in the package that need to be made visible at run time, but compile-time resources like header files and libraries are only needed by packages that build against it. So flux has the following statement:
This defines the enviroment variable FLUX_XML which will be set by the setup.* script in the cmt folder of any package that depends on flux via a public path.
But to avoid adding the include path and link options to clients of such a package, FluxSvc, for example, has the following statement:
But this applies to FluxSvc as well, so the statement to build the FluxSvc library must have the qualifier
The full command is: