Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2021-05-28 19:53:22


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)


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