Skip to content

build: enable vendoring dependencies #7199

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

compnerd
Copy link
Member

Setup the support for building SPM with vendored dependencies. This is preparatory work to enable the build of the LSP which is not possible to build with SPM on Windows and thus prevented from being able to be built and debugged outside of the toolchain build.

@compnerd
Copy link
Member Author

This is using a personal branch for swift-certificates as this is waiting on apple/swift-certificates#158 (CC: @yim-lee)

@MaxDesiatov MaxDesiatov requested a review from etcwilde December 13, 2023 20:19
@MaxDesiatov MaxDesiatov added dependencies Changes to dependencies and relevant checks cmake Changes related to CMake configuration labels Dec 13, 2023
set(BUILD_EXAMPLES NO)
set(BUILD_TESTING NO)

find_package(ArgumentParser CONFIG)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need to explicitly call find_package first? If you don't do anything FetchContent will call find_package first before doing anything, and only if it's not found will it do things. To tell it to use the CONFIG search mode, add do

FetchContent_Declare(ArgumentParser
  GIT_REPOSITORY https://github.com/apple/swift-argument-parser
  GIT_TAG 1.2.3
  FIND_PACKAGE_ARGS CONFIG)

https://cmake.org/cmake/help/latest/module/FetchContent.html#command:fetchcontent_declare -- FIND_PACKAGE_ARGS

erm... wait, that's only available in 3.24+. That makes things more challenging.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'll leave this as is until we get a newer CMake.

@compnerd
Copy link
Member Author

compnerd commented Jan 8, 2024

@swift-ci please test

Setup the support for building SPM with vendored dependencies.  This is
preparatory work to enable the build of the LSP which is not possible to
build with SPM on Windows and thus prevented from being able to be built
and debugged outside of the toolchain build.
@compnerd
Copy link
Member Author

compnerd commented Feb 1, 2024

@swift-ci please test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmake Changes related to CMake configuration dependencies Changes to dependencies and relevant checks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants