ETLCPP / etl

Embedded Template Library
https://www.etlcpp.com
MIT License
2.25k stars 393 forks source link

Make include paths to private files relative #946

Closed dhebbeker closed 3 months ago

dhebbeker commented 3 months ago

Analog to #879

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.

semanticdiff-com[bot] commented 3 months ago

Review changes with SemanticDiff.

jwellbelove commented 3 months ago

There are 622 lines in 63 files where this file path is used.

dhebbeker commented 3 months ago

I added 08365d0ec7088bedbe9fe9aadc5ca7b0851ffb2c to accommodate all findings of "etl/" in all files which are in include/. For other files this should not be (as) relevant.