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

Make include paths to private files relative. #879

Conversation

dhebbeker
Copy link
Contributor

By removing etl/ from include paths (in #include statements), the path to the directory include/ doesn't need to be provided to the preprocessor as an include path if the files in include/etl/ are included by other means. This has no disadvantages.
Actually the form #include "..." is intended to be used for relative paths in the first place.

This is relevant if one wants to include the source files from include/etl only indirectly.

For example we use special generated header files which wrap the include statement of the vanilla header files with diagnostic commands. Those commands disable some compiler diagnostics for ETL's files and re-enable them after the file inclusion. Wrapper files are generated for every non-private header file. We provide the directory with the wrapper files as include path to the preprocessor instead of the normal include/ directory. Thus include statements like #include "etl/private/..." are invalid in that case.

This may be beneficial only in special cases like ours. But it should have no disadvantages. In contrary, it uses the #include "..." form as intended.

By removing `etl/` from include paths (in `#include` statements), the path to the directory `include/` doesn't need to be provided to the preprocessor as an include path if the files in `include/etl/` are included by other means.
This has no disadvantages.
Actually the form `#include "..."` is intended to be used for relative paths in the first place.

This is relevant if one wants to include the source files from `include/etl` only indirectly.

For example we use special generated header files which wrap the include statement of the vanilla header files with diagnostic commands.
Those commands allow to disable diagnostic for ETL's files and re-enable them after the file inclusion.
Wrapper files are generated for every non-private header file.
We provide the directory with the wrapper files as include path to the preprocessor instead of the normal `include/` directory.
Thus include statements like `#include "etl/private/..."` are invalid in that case.
Copy link

Review changes with SemanticDiff.

@jwellbelove jwellbelove changed the base branch from master to development April 11, 2024 09:38
@jwellbelove jwellbelove merged commit 749d4a3 into ETLCPP:development Apr 11, 2024
59 checks passed
@dhebbeker dhebbeker deleted the feature/change-includes-to-relative-paths branch August 7, 2024 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants