Boost logo

Boost :

Subject: Re: [boost] [cmake] Pull request announcement
From: Peter Dimov (lists_at_[hidden])
Date: 2018-09-17 12:19:51


> Alexander Grund wrote:
>
> > Usual action for this is to only add the tests folder if
> > CMAKE_SOURCE_DIR==PROJECT_SOURCE_DIR (you are the project being build)
>
> This sounds sensible.

The two options I see for running the tests are

1. Use test/CMakeLists.txt as the root list file, put inside

    # our own library
    add_subdirectory(..)

    # test dependencies
    add_subdirectory(../../assert)
    add_subdirectory(../../core)

    enable_testing()

and proceed with declaring the tests.

2. Use CMakeLists.txt as the root list file, check as suggested above that
we're the root project, and if so,

    add_subdirectory(../assert)
    add_subdirectory(../core)
    add_subdirectory(test)


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