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

cmake: cleanup header paths #14416

Closed
wants to merge 9 commits into from
Closed

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Aug 6, 2024

  • sync build-dir/source-dir header path order with autotools, by
    including build-dir first, then source-dir.
    This prevents out-of-tree builds breaking due to leftover generated
    headers in the source tree.

  • tests/unit: move src ahead of libtest in header path, syncing with
    autotools.

  • stop adding non-existing generated include dir to header path.
    There are no generated include headers and this directory is either
    missing in out-of-tree builds or the same as the one already added
    globally via the root CMakeLists.txt.

  • lib: stop adding a duplicate source include directory to the header
    path.
    It's already added globally via the root CMakeLists.txt.

  • lib: stop adding the project root to the header path.

  • docs/examples: drop internal header paths.
    Examples do not and should not use internal headers.

  • replace curl_setup_once.h in comments with curl_setup.h,
    the header actually used, and also referred to in autotools comments.

  • add comment why we need src in include path for tests/server.

  • add quotes around header directories.

Closes #14416

There is no generated include header and this directory is
either missing in out-of-tree builds or the same as the
one already added globally via the root `CMakeLists.txt`.
It's already added globally from the root `CMakeLists.txt`.
Which is the header actually used and also referred to from autotools.
Besides syncing with autotools, this also prevents out-of-tree
builds breaking due to leftover generated headers in the source
tree.
Example do not and should not use internal headers.
@vszakats vszakats changed the title cmake: cleanup header paths cmake: cleanup private header paths Aug 6, 2024
@vszakats vszakats changed the title cmake: cleanup private header paths cmake: cleanup header paths Aug 6, 2024
@vszakats vszakats closed this in c6fb989 Aug 6, 2024
@vszakats vszakats deleted the cm-include-cleanup branch August 6, 2024 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

1 participant