Boost logo

Boost Users :

From: Jeff Garland (azswdude_at_[hidden])
Date: 2020-03-27 21:55:56


On Fri, Mar 27, 2020 at 11:21 AM Jeanette C. via Boost-users <
boost-users_at_[hidden]> wrote:

> Hey hey,
> I get a cmake error about a non-existent directory from
> boost::program_options, namely /include .
> It only happens with the program_options library. Other libs included in
> the
> project are date_time, filesystem and system.
>

So I don't think boost 1.72 has sorta partial cmake support -- are you
pulling that from elsewhere? As for the /include -- boost libraries have
the structure of libs/<libname>/include/boost/<libname> when they are in
github repos. When a release is made all those libname directories moved
into BOOST_ROOT/boost. So there's no 'include directories' in the distro
after that. AFACT date_time and program_options are the same on that.

> A quick peak at
> /lib/cmake/boost_program_options-1.72.0/boost_program_options-config.cmake
>

That file and path isn't in my 1.72 release....

> compared to the same file from date_time didn't give me any obvious hint
> though. But I'm not very familiar with cmake.
>

Don't worry, as soon as you are it will change ;)

> The cmake line to find these Boost packages is this:
> find_package(Boost 1.58 REQUIRED COMPONENTS program_options filesystem
> date_time system)
>

Boost 1.58 <-- is this possibly the issue -- 1.58 or 1.72?

Also, you should know that boost system can be used header only -- as can
date_time (just avoid old legacy i/o features).

Here's the error message from my program's cmake:
> [...]
> Imported target "Boost::program_options" includes non-existent path
> "/include"
> in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
> [...]
>
> Can someone reproduce the issue or suggest a fix?
>
>
Not without a bit more info -- but my guess is that cmake setup is looking
for a git repo based setup and not a release.

hth,

Jeff



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net