Closed paul-reilly closed 1 year ago
I will attempt to add a builtin cppfront rule.
Official cppfront support would be a good addition to xmake.
However this issue is general to files generated at build time for compilation with that pattern, which is used in the xmake documentation. I have seen it when adding a rule for files generated by drogon_ctl
, for example.
Thanks, the docs imply that the rule in the first post here would work:
https://xmake.io/#/manual/custom_rule?id=ruleadd_deps
I don't think a description of the autogen_codedep pattern is in the docs yet.
This is just to say the dynamic creation and injection of rules, not the automatic generation of code.
It's just that I happened to put in a small example of dynamic injection about cppfront.
I added it. cppfront https://github.com/xmake-io/xmake/pull/4140
Good stuff!
Imo that cppfront example should be removed from the docs because it implies that enforcing rule-ordering means that generated files are then compiled.
Thanks waruqi !
Xmake Version
v2.8.1+dev.bdb28e5
Operating System Version and Architecture
Linux 6.1.44-1-MANJARO x86_64 GNU/Linux
Describe Bug
When running this xmake.lua file to generate a single .cpp file, the build fails on first run even though the .cpp file is generated.
Expected Behavior
The generated main.cpp is compiled.
Project Configuration
Test cpp2 file:
Additional Information and Error Logs
Message with failed compilation: