On Jul 28, 2017, at 7:25 PM, Rene Rivera via Boost
wrote: On Fri, Jul 28, 2017 at 7:03 PM, paul via Boost
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.