|
Boost : |
Subject: Re: [boost] Boost tests with cmake
From: P F (pfultz2_at_[hidden])
Date: 2017-07-29 04:01:27
> On Jul 28, 2017, at 7:25 PM, Rene Rivera via Boost <boost_at_[hidden]> wrote:
>
> On Fri, Jul 28, 2017 at 7:03 PM, paul via Boost <boost_at_[hidden]>
> wrote:
>
>> Hi,
>>
>> So, I have made a small demo setting up the tests with cmake, here:
>>
>> https://github.com/pfultz2/boost-cmake-demo/tree/bcm-test-demo
>>
>> This builds and tests the libraries for Boost.System, so it includes:
>>
>
> The predef script is incorrect. This <
> https://github.com/pfultz2/boost-cmake-demo/blob/bcm-test-demo/libs/predef/test/CMakeLists.txt#L25>
> is not equivalent to the original <
> https://github.com/pfultz2/boost-cmake-demo/blob/bcm-test-demo/libs/predef/test/build.jam#L60>.
> As the "-DCHECK_VALUE=true" is not passed to compiler in response to the
> evaluation of '"BOOST_COMP_CLANG > 0.0.0" "BOOST_OS_LINUX == 0"'. It needs
> to try to compile and run one of the programs from here <
> https://github.com/pfultz2/boost-cmake-demo/tree/bcm-test-demo/libs/predef/tools/check>.
> The test is verifying that both this <
> https://github.com/pfultz2/boost-cmake-demo/blob/bcm-test-demo/libs/predef/tools/check/predef.jam>
> and this <
> https://github.com/pfultz2/boost-cmake-demo/blob/bcm-test-demo/libs/predef/tools/check/predef_check.h>
> work as expected. For cmake you would need still need to test the latter,
> still.
Yes, I need to add a custom function `predef_check` in cmake to support this, although it would be best to do the detection directly in cmake rather than through the running the tool, but either way I need to build these tools in cmake as well. Thanks for the feedback.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk