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-tool] Add a cmake preset for boostrap-vcpkg.sh #1380

Merged

Conversation

SchaichAlonso
Copy link
Contributor

scripts/bootrap.sh does some rather interesting composition of a cmake call around lines 214 which results in having to use eval to get rid of the double-escaping of some strings.

Further, the ninja-specific multi-task build job rules are quite nasty and probably don't provide us with anything that passing --parallel to cmake --build could also do.

Add a CMakePreset.json representing the cmake invokation of bootstrap.sh, and replace the ninja specific code by --build - or - if the ninja specialization has to stay, derive a ninja multi-tasking preset from the regular, which allows simplifying the bootstrap script, as well as invoking cmake in a vcpkg-tool checkout.

Fixes: microsoft/vcpkg#37958

@SchaichAlonso SchaichAlonso force-pushed the 37958-cmake-preset-for-bootstrap.sh branch from ce0bd28 to 54723b2 Compare April 3, 2024 16:55
@SchaichAlonso SchaichAlonso marked this pull request as ready for review April 3, 2024 16:55
@BillyONeal BillyONeal merged commit 2d6b5f4 into microsoft:main Apr 4, 2024
5 checks passed
@BillyONeal
Copy link
Member

Seems reasonable, thanks :)

SchaichAlonso added a commit to PurpleFlowerGarden/vcpkg that referenced this pull request Nov 6, 2024
There's a [string escaping madness in bootstrap.sh's cmake invokation around line 217, making the script difficult to maintain.

I broke it before in PR microsoft#36828 which went into master undetected as it "worked over here" (tm) and isn't executed by the CI, but appearently it wouldn't work on arch linux' bash, resulting in PR microsoft#37047 .

microsoft/vcpkg-tool#1380 introduces a CMake Preset that can take over the cmake CLI variable setup.

This commit replaces the nested string composition by it's cmake-preset counterpart.
SchaichAlonso added a commit to PurpleFlowerGarden/vcpkg that referenced this pull request Nov 6, 2024
There's a [string escaping madness in bootstrap.sh's cmake invokation around line 217, making the script difficult to maintain.

I broke it before in PR microsoft#36828 which went into master undetected as it "worked over here" (tm) and isn't executed by the CI, but appearently it wouldn't work on arch linux' bash, resulting in PR microsoft#37047 .

microsoft/vcpkg-tool#1380 introduces a CMake Preset that can take over the cmake CLI variable setup.

This commit replaces the nested string composition by it's cmake-preset counterpart.
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

Successfully merging this pull request may close these issues.

[vcpkg-tool] Add a cmake preset for boostrap-vcpkg.sh
2 participants