-
Notifications
You must be signed in to change notification settings - Fork 57
Support standalone builds and clean up test/CMakeLists.txt
#107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support standalone builds and clean up test/CMakeLists.txt
#107
Conversation
Flamefire
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should work, just a missed indent.
What exactly is BOOST_MSM_NONSTANDALONE_TEST used for? It doesn't seem to be required for the B2 based build so why for the CMake build?
The intention was the former: Calling cmake from msm, though I just tried out building the tests as part of the super-project and it works well for me - I'll stick to that in the future.
[...]
Despite my need of running the tests standalone having vanished, I guess the option to build MSM standalone might be useful.
Doesn't hurt I guess, as the additional code is small.
But it might be better to just support the integrated/super-project build unless you are reasonably sure MSM doesn't (and will not) rely on any Boost features introduced after 1.66.
Also supporting 3 types of testing (CMake super-project, standalone, b2) might be a maintenance burden. But that's up to you of course.
Anyway this change looks sound and is certainly an improvement.
The test Jamfile creates an executable for each source file, in this case BOOST_TEST_MODULE is not defined and a main function is provided in each source file by defining
Indeed, I would like to retain the CMake version due to better IDE integration in VS Code. I'll check on that. |
I see, yes that makes sense. You could do the same in the Jamfile if you want, but I guess this separation gives a bit faster turnaround times on CI due to parallelisation. BTW: For your
I wasn't suggesting dropping the CMake version just to use the regular super-project version that doesn't require a find for an installed Boost. But as mentioned, now the additional code is minimal and if this is just a "hidden feature" you don't need to care about it not working with any Boost version |
Ahh nice, thanks for the tip! I didn't know about this setting yet and usually sticked to listing the files manually.
I meant to say I would like to retain the CMake version(s) and eventually drop b2, if possible. |
Listing the files manually is actually preferred because the GLOB does not regenerate the build files when adding new files so manual work is required either way, even if just rerunning CMake.
As b2 is still the main build system I wouldn't do so. You can generate your CMake tests automatically from the test Jamfile, although that results in the same individual executables as b2 creates. This ensures they stay consistent. |
…est/CMakeLists.txt to fix missing dependencies
9aa7254 to
c6c5795
Compare
|
Now the CMake tests fail with https://github.com/boostorg/boost/actions/runs/18063746716/job/51403678027 |
|
#116 should fix it. |
Do you think it makes sense to add such a job to the MSM repo for better regression? |
|
The CI is indeed missing CMake tests. Either add them or switch to the reusable Boost.CI workflow. See https://github.com/boostorg/boost-ci/blob/master/.github/workflows/ci.yml for big coverage of configs and automatic updates/fixes |
Applied changes:
teststargetResolves #111