logfmtxx icon indicating copy to clipboard operation
logfmtxx copied to clipboard

C++ module example using VS 2022/CMake

Open pjmlp opened this issue 10 months ago • 3 comments

Here is an example on how to provide a C++ module alongside the header file.

Only tested with Visual Studio 2020 alongside CMake. Currently don't have access to clang 17.

I also had to explicitly add the required standard library includes to the test files.

If nothing else, it is way to learn about how to do this, when modules are more mature.

pjmlp avatar Apr 04 '24 14:04 pjmlp

I see.

I'd rather not have CMake though for this very little library. I'll lookup what the CMake directives are actually doing and check if I can do this with gcc/mingw64.

linkdd avatar Apr 04 '24 15:04 linkdd

To save you some time, GCC modules support is still on its infancy, quite behind the other two main ones.

Anyway, feel free to close this PR, it was mostly to show you how it could be done.

pjmlp avatar Apr 04 '24 15:04 pjmlp

Thanks, I'll keep it open for reference, and probably add a milestone in the future. I consider closed PRs as either rejected (aka: wontfix) or merged 🙂

linkdd avatar Apr 04 '24 15:04 linkdd