|
Boost : |
From: ÐмиÑÑий ÐÑÑ
ипов (grisumbras_at_[hidden])
Date: 2024-05-22 07:55:03
вÑ, 21 Ð¼Ð°Ñ 2024â¯Ð³. в 18:42, Robert Ramey via Boost <boost_at_[hidden]>:
> I would also like to implement support for CDash.
You keep bringing up CDash. How is it in any way better than having a
proper CI system? It's basically CI, but manual, and with fewer
platforms.
вÑ, 21 Ð¼Ð°Ñ 2024â¯Ð³. в 21:05, Alain O' Miniussi via Boost <boost_at_[hidden]>:
> I use CMake for building and testing Boost.MPI. Not sure I added the last tests to the b2 framework.
This implies that MPI is not fully tested for release.
ÑÑ, 22 Ð¼Ð°Ñ 2024â¯Ð³. в 07:55, Robert Ramey via Boost <boost_at_[hidden]>:
> Hmmm ... Better in what way? They should produce the same result or
> close to it. My problem with B2 is that its complex, hard to
> understand, a lot of work to maintain and fragile.
I wondered what makes b2 so complex compared to CMake, so I opened two
files from your project: one for b2 build, and another for CMake build
https://github.com/boostorg/safe_numerics/blob/develop/test/Jamfile.v2
https://github.com/boostorg/safe_numerics/blob/develop/test/CMakeLists.txt
Both look very simple and linear. The difference with the CMake file
is that it sets properties used by IDE generators.
Now, the CMake file uses such functions like test_run_pass,
test_compile_pass, and test_compile_fail. These functions aren't a
part of CMake itself, they are defined inside the project's root CML.
For example, this is the definition of test_compile_fail:
https://github.com/boostorg/safe_numerics/blob/develop/CMakeLists.txt#L129-L149
So, the test is supposed to be run, fail, and the developer mentally
(although, I guess physically, in a notebook, also works) checks it as
succeeding. In a way it is in line with your appreciation for CDash,
which is a sort of manual CI.
Some people may think that surely, there should be a less backwards
way to run compile-fail tests in CMake. There is! Peter Dimov has
implemented it as part of his CMake support:
https://github.com/boostorg/cmake/blob/develop/include/BoostTest.cmake#L187-L200.
The trick is to automate the "run and fail" part. The function
launches _another_ instance of CMake that tries to build the target
and fails.
So, to be honest, I'm not a fan of abandoning b2 in favour of CMake.
And I didn't even touch on multiconfig builds.
> I also very much like that CMake can be used to create GUI projects in XCode, VS, etc. I
> actually use this facility.
I give you this, CMake does have good integration with IDEs.
BTW, there have been several remarks about people having problems with
b2 which couldn't be solved. But I don't see those on ML. Maybe I'm
not subscribed to the correct list? I would be glad to help you with
those issues, if I can.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk