Boost logo

Boost :

From: Edward Diener (eldiener_at_[hidden])
Date: 2021-05-29 03:51:29


On 5/28/2021 3:53 PM, Peter Dimov via Boost wrote:
> Edward Diener wrote:
>>>> Is there documentation anywhere for all this boost cmake stuff ? I
>>>> have to make some changes to the cmake things in libraries I maintain, ...
>>>
>>> Not yet. What changes would you like to make?
>>
>> The CMake preprocessor tests do not really follow exactly the b2 preprocessor
>> tests anymore. I will figure it out, but really docs are needed at sometime in
>> the future regarding CMake with Boost CMake constructs. You did a great and
>> laborious job so I do not mean to press you about this.
>
> Ah, I see, you've been making changes to the tests. I believe that
>
> https://github.com/boostorg/preprocessor/blob/develop/test/CMakeLists.txt
>
> should be relatively straightforward to figure out, provided you are familiar with
> CMake. The full syntax of `boost_test` is
>
> https://github.com/boostorg/cmake/blob/39443f18c03c4568fdf75bed3eaa802c26563663/include/BoostTest.cmake#L40-L47
>
> boost_test( [TYPE type] [PREFIX prefix] [NAME name] [IGNORE_TEST_GLOBALS]
> SOURCES sources...
> ARGUMENTS args...
> LINK_LIBRARIES libs...
> COMPILE_DEFINITIONS defs...
> COMPILE_OPTIONS opts...
> COMPILE_FEATURES features...
> )
>
> but I don't think you need anything besides COMPILE_DEFINITIONS. This for
> example
>
> [ compile arithmetic.cpp : <define>BOOST_PP_LIMIT_MAG=512 : arithmetic_num_512 ]
>
> translates to
>
> boost_test(TYPE compile NAME arithmetic_num_512 SOURCES arithmetic.cpp COMPILE_DEFINITIONS BOOST_PP_LIMIT_MAG=512)

I can figure that part of it out, but now the big question:

What do I do to run the tests with CMake and where do I see the output
to verify that any changes I make to the CMakeLists.txt in a test
directory is correct ?


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