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

Don't assign anything but the top-level include directory to target include directories #116

Open
mortbopet opened this issue Sep 6, 2024 · 0 comments

Comments

@mortbopet
Copy link
Contributor

mortbopet commented Sep 6, 2024

This project already has fairly well defined include namespacing, so i'm surprised to see non-top-level-include directories being added as include directories (e.g. here:

$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../../include/substrait/common>
).

The above pattern will pollute the global include path, which may cause include conflicts.

Specifically, this example causes a conflict on windows, where io.h is a windows header... which then conflicts with io.h in this repository.

In general, having access to header files from paths not anchored by the include namespacing of a project (#include "substrait/.../...) will make a project prone to errors when being used as a library.

mortbopet added a commit to mortbopet/substrait-cpp that referenced this issue Sep 6, 2024
As described in substrait-io#116, the `io.h` file in this project conflicts with `io.h` of windows.

This fixes that (in the somewhat narrow compilation path that i'm exercising) by removing `include/substrait/common` from the include path, and instead relying on the (already existing) full include-path namespacing instead of relative includes of `io.h`.
mortbopet added a commit to mortbopet/substrait-cpp that referenced this issue Sep 6, 2024
As described in substrait-io#116, the `io.h` file in this project conflicts with `io.h` of windows.

This fixes that (in the somewhat narrow compilation path that i'm exercising) by removing `include/substrait/common` from the include path, and instead relying on the (already existing) full include-path namespacing instead of relative includes of `io.h`.
mortbopet added a commit to mortbopet/substrait-cpp that referenced this issue Sep 7, 2024
As described in substrait-io#116, the `io.h` file in this project conflicts with `io.h` of windows.

This fixes that (in the somewhat narrow compilation path that i'm exercising) by removing `include/substrait/common` from the include path, and instead relying on the (already existing) full include-path namespacing instead of relative includes of `io.h`.
EpsilonPrime pushed a commit that referenced this issue Sep 7, 2024
As described in
#116, the `io.h`
file in this project conflicts with `io.h` of windows.

This fixes that (in the somewhat narrow compilation path that i'm
exercising) by removing `include/substrait/common` from the include
path, and instead relying on the (already existing) full include-path
namespacing instead of relative includes of `io.h`.
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

No branches or pull requests

1 participant