Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source file scoping specification #95

Open
zoziha opened this issue Mar 9, 2023 · 0 comments
Open

Source file scoping specification #95

zoziha opened this issue Mar 9, 2023 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@zoziha
Copy link
Collaborator

zoziha commented Mar 9, 2023

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. source file scoping specification
  3. Unable to find dependency from parent directory when building exe
@zoziha zoziha added the documentation Improvements or additions to documentation label Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant