Skip to content

Source file scoping specification #94

Open
@zoziha

Description

@zoziha

Description

There is a source file scoping specification in the fpm developer specification, but it is somewhat hidden and not obvious, and it is important enough to be included in the user documentation.

Specification contents:

## Source file scoping
Source files are assigned a scope of either FPM_SCOPE_LIB, FPM_SCOPE_APP or FPM_SCOPE_TEST.
The scope controls which modules may be used by the source file:

- Library sources (FPM_SCOPE_LIB) may only use modules also with library scope.
  This includes library modules from dependencies.

- Executable sources (FPM_SCOPE_APP,FPM_SCOPE_TEST) may use library modules (including dependencies)
  as well as any modules corresponding to source files in the same directory
  or a subdirectory of the executable source file.

Links

  1. intended design
  2. specification
  3. Unable to find dependency from parent directory when building exe

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions