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

CMake/CPack 'distrib' target isn't correct for Windows #3971

Closed
steven-johnson opened this issue Jun 28, 2019 · 7 comments · Fixed by #5135
Closed

CMake/CPack 'distrib' target isn't correct for Windows #3971

steven-johnson opened this issue Jun 28, 2019 · 7 comments · Fixed by #5135
Labels
build Issues related to building Halide and with CI

Comments

@steven-johnson
Copy link
Contributor

A while back, someone thoughtfully contributed CPack support to our CMake files, so that make distrib worked correctly for CMake as well as make; unfortunately, it needs some extra love for Windows builds in order to match the status quo for Windows:

  • Windows requires separate Debug and Release builds; the CMake rules only provide a single build (presumably Release)
  • The CMake rules only provide shared-library outputs (bin/Halide.dll), whereas our existing Windows distribs provide Halide.lib as well

This would be really nice to fix, as currently, Windows distribs are produced by custom code in the buildbots, which can (and does) easily fall out of sync with the rest of Halide.

@alexreinking
Copy link
Member

This is getting overhauled in #4644 -- I'll need to look into package managers for Windows, eg. vcpkg, chocolatey, Nuget, to see which would be easiest to publish Halide to.

@alexreinking
Copy link
Member

It turns out that the vcpkg people are currently packaging an old version of Halide. We should work with them as we cut a new release to make sure the new CMake improvements are available to their users.

@steven-johnson
Copy link
Contributor Author

See also #4539

@alexreinking alexreinking added the build Issues related to building Halide and with CI label May 2, 2020
@alexreinking
Copy link
Member

This can only be reasonably done with CMake 3.16 and only becomes sane in the absolute newest version, 3.17. This is because CPack only gained the ability to produce multi-configuration packages recently. We should just keep CMake on the Windows buildbots as up-to-date as possible and write packaging/CMakeLists.txt to detect newer features.

@alexreinking
Copy link
Member

This will be corrected once CMake 3.18 is released due to a bug in 3.17. We will need to use the Ninja Multi-Config generator and then run:

> cmake -G "Ninja Multi-Config" ...
> cmake --build . --config Debug
> cmake --build . --config Release
> cpack -C "Debug;Release"

See #4980 and the related issue on CMake

@steven-johnson
Copy link
Contributor Author

Hopefully we can continue with our current CMake min of 3.16 and just require 3.18 for building windows distribs?

@alexreinking
Copy link
Member

Yes, this is about the tool versions, not anything that's in the CMakeLists.txt files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues related to building Halide and with CI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants