asio icon indicating copy to clipboard operation
asio copied to clipboard

Add dependency on Boost::align

Open ecatmur opened this issue 4 years ago • 6 comments

it is required on Windows (from boost/asio/detail/memory.hpp), since MSVC doesn't have std::aligned_alloc

The source code in this repository is generated from an upstream repository at https://github.com/chriskohlhoff/asio.

Please consider raising new pull requests at https://github.com/chriskohlhoff/asio/pulls.

ecatmur avatar Oct 29 '21 10:10 ecatmur

This is also needed on Linux.

Ping @pdimov. Is CMakeLists.txt maintained locally by Boost? Looks like it's not part of the upstream ASIO.

Lastique avatar Oct 29 '21 23:10 Lastique

No idea who is maintaining the CML file. :-) The PR seems correct to me.

pdimov avatar Oct 29 '21 23:10 pdimov

But I can merge this if Chris wants us to maintain the CML. Chris?

pdimov avatar Oct 30 '21 14:10 pdimov

Commit applied. Are there automated tests of this cmake stuff somewhere?

chriskohlhoff avatar Nov 01 '21 10:11 chriskohlhoff

There are some automated tests for Boost as a whole (whether it builds and installs with CMake), but they can't catch this. There are no outside tests that test every library one by one; such tests need to be enabled in the library repos.

Example workflows are this one that tests use with add_subdirectory and this one that tests use after installation.

pdimov avatar Nov 01 '21 13:11 pdimov

An easier approach for libraries such as Asio where CMakeLists.txt is generated by boostdep --cmake asio is to have a ci.yml job that compares the current contents to the generated output and fails if they don't match. Although this will occasionally fire when I make changes to boostdep.

pdimov avatar Nov 01 '21 15:11 pdimov