Boost - Dev mailing list 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:
* assert * config * core * predef * static_assert * system * winapi
There are no tests for winapi right now, because I don't have a windows machine to test on(but I suppose I could've tested with mingw).
This uses the BCM modules to provide common functionality for building and tests. All the tests are setup to run through CTest, and some targets are provided for building the tests.
A `tests` target will build(but not run) all the tests. The `check` target will build and run all tests.
Since we do want to filter tests by library, all tests are added with the label of the project name(which can be filtered with `ctest -L <label> `). Furthermore there are targets `tests- <project-name> ` and `check- <project- name> ` that will build and test a single project respectively. So if we are only interested in the tests for `boost_assert` we can run:
cmake --build . --target check-boost_assert
And this will build and test `boost_assert`.
Any feedback will be useful as we move forward on adding the rest of the tests to cmake.
Paul
I think this is absolutely incredible. I may not agree with every last detail about how BCM handles things, but my opinion is that this is the way we should go. Based on your example and the dependency report, I think it should be easy to do MPL + Fusion (I can have a shot at those). I'll also give a shot at making Hana use the same conventions you do with BCM and I'll be able to provide some feedback based on actual experience. If we go Paul's way (which is IMHO the right way in the long term), how does the community want to proceed? I would suggest we just start checking CMakeLists.txt files into existing libraries and slowly improve our coverage that way. That way, we'll get actual experience and we'll be able to refine BCM, and we'll also be making concrete progress towards the end goal. Louis -- View this message in context: http://boost.2283326.n4.nabble.com/Boost-tests-with-cmake-tp4697568p4697576.... Sent from the Boost - Dev mailing list archive at Nabble.com.