franneck94 / Vscode-C-Cpp-Runner

🚀 Compile, run and debug single or multiple C/C++ files with ease. 🚀
MIT License
53 stars 14 forks source link

[ENH] C++20 Module Support #95

Open txjohnson opened 1 year ago

txjohnson commented 1 year ago

How about support for modules?

At least for Clang, C++ modules (given as '.cppm' files) need to be precompiled using a '--precompile' option. This produces a '.pcm' file that regular compilation needs.

So we need an additional precompile phase whose output should go into a modules folder. That folder has to be provided to the regular compilation phase using the '-fprebuilt-module-path' option.

GCC has something similar but I haven't tried it. I think a general precompile phase for certain files (ie 'cppm' or some user specified type) will cover both compilers. Perhaps inputs for module folder and module specific switches as well?

franneck94 commented 1 year ago

I will wait a few more months, until more and more ppl want to / will use modules.

franneck94 commented 1 year ago

Since the compiler vendors are not yet fully ready for modules, it is still post poned