Xmake support
- Dominant language
- C++
- Stars
- 21.5k
- Forks
- 3.5k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 2
Description
I was able to successfully use Catch2 `v2` with Xmake by simply adding `#define CATCH_CONFIG_MAIN` and `#include ` to the tests cpp file. However, I couldn't figure out how to make Catch2 `v3` work with Xmake yet. I get `undefined reference to 'main'`.
There's a page about [Cmake integration](https://github.com/catchorg/Catch2/blob/devel/docs/cmake-integration.md) but unfortunately there's no page about Xmake integration. It would be very helpful if such a file existed.
I'm guessing I have to link with `Catch2Main` but adding `add_ldflags("-lCatch2Main")` didn't help so I'm currently out of ideas.
Contributor guide
Research direction
Start with docs/cmake-integration.md and the reported Xmake setup for the tests cpp file. Investigate the Catch2 v3 undefined-reference-to-main problem and the attempted Catch2Main link, then document the working Xmake integration steps. Done means a clear Xmake integration page covers the v3 entry point and lets users build and run tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- documentation, testing-qa
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100