-
-
Notifications
You must be signed in to change notification settings - Fork 474
Add modules support #1015
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
base: main
Are you sure you want to change the base?
Add modules support #1015
Conversation
…o 6.0.0, fixing this
Directly go to `modules/ftxui`
No longer needed
Thanks! I am enthousiastic. Things to keep in mind. FTXUI supports C++11, so it must not break those users. A priori, it is possible to support both. To provide a review, I would need to spend some time learning about C++ module, to ensure this patch is the best we can do, without regrets. It will take me some time. |
I think it would be best if modules were just opt-in, so that those using C++20 can benefit from them while the builds using pre-C++20 do not break either. I can make this change, and the library should be compatible for all versions. |
I got an error:
This is problematic, because it means all FTXUI users will have this error. We should probably try to detect what cmake generator is in use and enable modules when supported. Then I tried: cmake .. -DCMAKE_GENERATOR:INTERNAL=Ninja but it doesn't work:
I see I need to install Maybe this is too early to support C++ modules by default? Alternatively, maybe we should put this behind a build flag. |
I put it behind a flag that should now only build if the flag |
Hi, are there any changes you're still looking for before you can accept the pull request and have it merged? |
I'm actually now wondering if |
Thanks! I am going to:
I don't have a lot of time, so please expect ~1 month before I can fully merge this patch. I don't want to rush support this. |
I made an update:
Tasks (Feel free to grab)
|
I think C++ modules require CMake 3.28, is there a reason you lowered the version requirement? |
Increasing the cmake version would prevent a lot of users from using FTXUI. It can be conditionnal on |
I am supportive of the idea of having a single By the way, the two additional repositories adding additional components, I don't know if you plan on eventually integrating these into the main repo, but for now I do have a template on my own project for a |
I have tried making a C++ modules version for FTXUI, which is built if CMake version is above 3.28. I've tested these modules on my own projects and they work fine, and I'm sure most C++20+ users would like the ability to import FTXUI as a module.
FTXUI is now importable with: