Can a package add source files to a target? #7243
MeanSquaredError
started this conversation in
General
Replies: 1 comment 3 replies
-
|
Currently, only packages maintained by xmake.lua support module distribution. (https://github.com/xmake-io/xmake-repo/blob/b1a575857278fff55bb8722fec6cf7d2a688ecee/packages/m/magic_enum/xmake.lua#L43) |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am progressing nicely with my overhaul of the CMake package manager as described here
#7072 (comment)
After the overhaul, it will be possible to import CMake packages that define C++20 modules.
However I have a problem with the importing of source files. Currently C++20 module BMI/CMI files are not really portable, so a module must export its interface in the form of modules interface files that have the .cppm, .mpp, or some other similar extension.
However I don't see a way for a package manager to export C++ source files. More specifically the CMake package manager seems to export the following properties:
Is there a way for the package manager to attach some source files to a package
mypkg, so that the correspondingadd_packages("mypkg")under some target would also add these source files to that target. Afterwards, when this target is built, the added source files would be built as part of the target.I am not able to find a way to attach the sources to a package. Is that possible at all?
Beta Was this translation helpful? Give feedback.
All reactions