-
Notifications
You must be signed in to change notification settings - Fork 61
Add CMake modules for finding and and executing Fusion #206
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: master
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #206 +/- ##
=======================================
Coverage 96.39% 96.39%
=======================================
Files 2 2
Lines 18430 18433 +3
=======================================
+ Hits 17766 17769 +3
Misses 546 546
Partials 118 118 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
pfusik
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.
Thank you very much for your contribution! Sorry for late review.
I think it's okay license-wise, as your CMake modules are clearly a separate work from the transpiler itself. This is similar to e.g. GCC and other GNU tools.
cmake/UseFusion.cmake
Outdated
| OUTPUT <output> | ||
| [NAMESPACE <namespace>] | ||
| [DEFINES <symbol1> <symbol2> ...] | ||
| [RESOURCES <file1.fu> <file2.fu> ...] |
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.
| [RESOURCES <file1.fu> <file2.fu> ...] | |
| [REFERENCE <file1.fu> <file2.fu> ...] |
Or perhaps REFERENCES ?
This option should be named similarily to the C# compiler's -r option. Does csc have a CMake package?
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.
Done.
Does csc have a CMake package?
As far as I know, you can build C# projects with CMake. However, I'm not aware of a CMake package for csc.
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.
If it's SOURCES, it should be REFERENCES with an S.
It looks like CMake 3.8 has C# support, and the property is called VS_DOTNET_REFERENCES.
|
I extended the example with Lua bindings generated via SWIG from the Fusion-transpiled C++ library. This could serve as an indication that additional languages can be targeted through the C/C++ output. |
No worries! Thank you for this awesome project! |
That's an interesting idea! I'm just afraid this could be confusing for people just starting with Fusion. I'd prefer to document it instead. |
|
Feel free to add GitHub Actions and/or Travis CI configuration to test these CMake modules, starting with fut's |
| @@ -0,0 +1,18 @@ | |||
| native { | |||
| #include "fibonacci.hpp" | |||
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.
I don't like this native { #include }. Let's remove it and move fibonacci.fu from REFERENCES to SOURCES.
This way this test source could be reused for different languages.
Note that the CMake modules are licensed under the same terms as those modules shipped with CMake (the BSD 3-Clause License). I know that Fusion is licensed under the terms of the GPLv3 license, but I'm not sure what the implications are if these modules are included in other projects.