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

[vcpkg baseline][vcpkg toolchain] Fix toolchain usage with CMake <= 3.19 #23410

Merged
merged 3 commits into from
Mar 7, 2022

Conversation

dg0yt
Copy link
Contributor

@dg0yt dg0yt commented Mar 7, 2022

dg0yt referenced this pull request Mar 7, 2022
* Use host tools by default.

* use GLOB_RECURSE and filter the result

* be positiv ;)

* give me debug output

* Revert "give me debug output"

This reverts commit 17737bc.

* remove unnecessary if(IS_DIRECTORY)

Co-authored-by: Alexander Neumann <you@example.com>
@JackBoosY
Copy link
Contributor

BTW it should be 3.20.0, see PR https://gitlab.kitware.com/cmake/cmake/-/merge_requests/5693 milestone.

@dg0yt
Copy link
Contributor Author

dg0yt commented Mar 7, 2022

BTW it should be 3.20.0, see PR https://gitlab.kitware.com/cmake/cmake/-/merge_requests/5693 milestone.

AFAICS it was fixed in 3.20.0. My wording refers to the broken state, which is <= 3.19.

@JackBoosY JackBoosY self-assigned this Mar 7, 2022
@JackBoosY JackBoosY added the category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) label Mar 7, 2022
@JackBoosY JackBoosY changed the title [vcpkg] Fix toolchain usage with CMake <= 3.19 [vcpkg baseline][vcpkg toolchain] Fix toolchain usage with CMake <= 3.19 Mar 7, 2022
@JackBoosY JackBoosY added the info:reviewed Pull Request changes follow basic guidelines label Mar 7, 2022
@JackBoosY
Copy link
Contributor

Ping @vicroms @BillyONeal for merge this first.

@JackBoosY JackBoosY removed the info:reviewed Pull Request changes follow basic guidelines label Mar 7, 2022
@JackBoosY
Copy link
Contributor

I'd like to fix #23395 in this PR.

file(GLOB_RECURSE Z_VCPKG_TOOLS_FILES LIST_DIRECTORIES false "${tools_base_path}/*")
list(REMOVE_ITEM Z_VCPKG_TOOLS_DIRS ${Z_VCPKG_TOOLS_FILES})
list(REMOVE_ITEM Z_VCPKG_TOOLS_DIRS ${Z_VCPKG_TOOLS_FILES} "") # need at least one item for REMOVE_ITEM if CMake <= 3.19
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd like to use "" here, sorry for not having your consent.

@JackBoosY JackBoosY added the info:reviewed Pull Request changes follow basic guidelines label Mar 7, 2022
@JackBoosY JackBoosY linked an issue Mar 7, 2022 that may be closed by this pull request
@JackBoosY
Copy link
Contributor

@johnmcfarlane Can you please test this changes in your local machine? It should fix your issue.

@johnmcfarlane
Copy link

@JackBoosY thanks, it unblocks me and although the tools/ directory is still not present, the path being passed into the glob commands looks well-formed: /home/john/ws/wordle/vcpkg/vcpkg_installed/x64-linux/tools/.

@Neumann-A
Copy link
Contributor

tools/ directory is still not present

The tools directory only exists if you have a port installed which installs some sort of tool. Otherwise it does not exist by default.

johnmcfarlane pushed a commit to johnmcfarlane/wss that referenced this pull request Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
5 participants