Boost logo

Boost :

From: Ivica Siladic (ivica.siladic_at_[hidden])
Date: 2024-10-21 13:17:35


Hi Vinnie,

> On 20.10.2024., at 19:25, Vinnie Falco <vinnie.falco_at_[hidden]> wrote:
>
> On Sat, Oct 19, 2024 at 4:44 PM Ivica Siladic via Boost <boost_at_[hidden] <mailto:boost_at_[hidden]>> wrote:
>> ...
>
> I use the Visual Studio IDE, which is great for debugging. I cloned async-mqtt5 into my Boost superproject at boost/libs/async-mqtt5 to try it out. I tried to generate a Visual Studio Solution for async-mqtt5 using this command line:
>
> cmake -G "Visual Studio 17 2022" -A x64 -B bin64 -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE="C:/Users/vinnie/src/boost/libs/http_proto/cmake/toolchains/msvc.cmake"
>
> Unfortunately, I got much more than I wanted. CMake ended up installing a ton of Boost version 1.83.0 libraries, I'm not sure where they went but here is the log:
>
> https://gist.github.com/vinniefalco/446c6b2caed6ff98bc7d522349bab185
>
> Now, vcpkg is showing all these packages locally:
>
> https://gist.github.com/vinniefalco/fd24ed4ac2239287da5fc293432536b1
>
> Sadly, when I opened the async-mqtt5.sln (Visual Studio solution file) it had nothing in it:
>
> <image.png>
>
> 1. How do I properly undo all the stuff that was installed?
>
> 2. How do I generate a useful Visual Studio Solution where I can see the source files, build the examples, run them and set breakpoints?
>

The CMakeLists.txt file in the root folder is used to configure include directories and dependencies for building projects based on async_mqtt5. It does not define any build targets. It does, however, define BUILD_EXAMPLES macro which will generate project for an example. Therefore, please do not run the following command:

cmake -G "Visual Studio 17 2022" -A x64 -B bin64 -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE="C:/Users/vinnie/src/boost/libs/http_proto/cmake/toolchains/msvc.cmake"

If you'd like to generate .vcxproj files for the included examples, you can do so by running:

cmake -G "Visual Studio 17 2022" -A x64 -B bin64 -DBUILD_EXAMPLES=ON

This will get you .vcxproj that you’ve expected.

> Thanks
>

Thanks,
Ivica Siladic


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk