Boost logo

Boost :

From: Vinnie Falco (vinnie.falco_at_[hidden])
Date: 2023-02-05 19:03:33


On Sat, Feb 4, 2023 at 7:56 PM Klemens Morgenstern via Boost
<boost_at_[hidden]> wrote:
> Boost.Mustache is an implementation of Mustache templates in C++11.

I cloned this bad boy into ${BOOST}/libs and then tried to build a
Visual Studio Solution for it with:

    $ cmake -G "Visual Studio 16 2019" -A x64 -B bin64

Unfortunately this failed, and I got a bunch of errors like this:

    CMake Error at CMakeLists.txt:10 (add_library):
     Target "boost_mustache" links to target "Boost::config" but the target was
     not found. Perhaps a find_package() call is missing for an IMPORTED
     target, or an ALIAS target is missing?

Then I was advised by the author to use this command line from the root:

    cmake -G "Visual Studio 16 2019" -A x64 -B libs/mustache/bin64
-DBOOST_INCLUDE_LIBRARIES=mustache -DBUILD_TESTING=ON

This also produced an error:

    CMake Error: The source "C:/Users/vinnie/src/boost/CMakeLists.txt"
does not match the source
"C:/Users/vinnie/src/boost/libs/mustache/CMakeLists.txt" used to
generate cache. Re-run cmake with a different source directory.

Tried adding the path to the lib:

    cmake -G "Visual Studio 16 2019" -A x64 -B libs/mustache/bin64
-DBOOST_INCLUDE_LIBRARIES=mustache -DBUILD_TESTING=ON libs/mustache

Same result. Well I deleted all the cached artifacts and then used this line

    cmake -G "Visual Studio 16 2019" -A x64 -B bin.v2/vs/mustache
-DBOOST_INCLUDE_LIBRARIES=mustache -DBUILD_TESTING=ON libs/mustache

Finally I got a Visual Studio solution with some projects in it (see
attached image). It builds but the solution and projects have some
cosmetic issues:

* Every solution built from the root has the same name Boost.sln

* Every Visual Studio window that opens Boost.sln has the title
"Boost" (can't tell which is which)

* mustache .vcxproj files have unnecessary nesting. "Header Files"
folder then "boost" then "mustache".

* dependencies are thrown together with the library-specific projects

It works, but does not bring me joy.

Thanks



mustache-sln.png

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