-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Windows: compile xz with CMake #6947
Conversation
Sounds good! What sort of speedup do you see? |
Almost 2x on my 6 core 12 thread CPU. With
Without
|
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
for more information, see https://pre-commit.ci
".", | ||
] | ||
), | ||
f"{{cmake}} --build . --clean-first --parallel --target {target}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I originally updated the documentation in this PR to require CMake 3.13+ as that is what xz's CMake files specify.
I missed that the cmake --build
command requires CMake 3.15+ when there are multiple targets, I've now updated the PR.
The previous CMake requirement was 3.12, which is what is included with VS2017 and was the oldest I tested when writing the documentation in #4495.
VS2019 includes CMake 3.20, but I've found that 3.15 is sufficient for this PR.
Changes proposed in this pull request:
Compile liblzma with CMake instead of VS project file, for Updated xz to 5.4.1 #6883 (comment):
This might also help with Failed to build Windows ARM64 dependencies #6679 (comment)
Use Ninja instead of NMake to build dependencies by default. Unlike NMake, Ninja can build several files in parallel. This makes very little difference on GHA which only provides 2 CPU cores, but is almost 2x faster on my computer.
Rewrite argument parsing in
winbuild\build_prepare.py
usingargparse
for better maintainability.