Boost logo

Boost :

From: Mike (mike.dev_at_[hidden])
Date: 2019-11-26 21:48:16


> Gesendet: Dienstag, 26. November 2019 um 21:23 Uhr
> Von: "Vinnie Falco via Boost" <boost_at_[hidden]>
> An: "boost_at_[hidden] List" <boost_at_[hidden]>
> Cc: "Vinnie Falco" <vinnie.falco_at_[hidden]>, "Peter Dimov" <pdimov_at_[hidden]>
> Betreff: Re: [boost] [FixedString] Deniz' review
> On Tue, Nov 26, 2019 at 9:52 AM Peter Dimov via Boost
> <boost_at_[hidden]> wrote:
> > If you want an implementation-detail CMakeLists.txt file, full of bad
> > practices and only useful to you, put that in a directory somewhere.
>
> Hmm... no, that doesn't seem to work. I tried moving the top level
> CMakeLists.txt to tools/CMakeLists.txt, and changing the calls to
> add_subdirectory to:
>
> add_subdirectory (../bench)
> add_subdirectory (../example)
> add_subdirectory (../test)
>
>
> Then from bin/ I type:
>
> cmake ../tools
>
> And I get these errors:
>
> CMake Error at CMakeLists.txt:151 (add_subdirectory):
> add_subdirectory not given a binary directory but the given source
> directory "C:/Users/vinnie/src/boost/libs/json/bench" is not a subdirectory
> of "C:/Users/vinnie/src/boost/libs/json/tools". When specifying an
> out-of-tree source a binary directory must be explicitly specified.

As the message states, you have to explicitly specify the binary directory:

add_subdirectory (../bench bench )
add_subdirectory (../example example)
add_subdirectory (../test test)

Those will be evaluated relative to the curreent output directory.

Best

Mike

>
> Thanks
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


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