Skip to content

cmake: cleanup header paths - #14416

Closed
vszakats wants to merge 9 commits into
curl:masterfrom
vszakats:cm-include-cleanup
Closed

vszakats wants to merge 9 commits into
curl:masterfrom
vszakats:cm-include-cleanup

Conversation

@vszakats

@vszakats vszakats commented Aug 6, 2024 •

Copy link
Copy Markdown
Member
  • 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