Skip to content

Conversation

@prcolaco
Copy link
Contributor

This PR implements the feature of compiling multiple source files to the same contract, if they are grouped inside a subfolder of the one that is passed to --path, or default ./contracts.

This means that the behaviour is the same as before if: ./contracts/contract1.cpp and ./contracts/contract2.cpp,
but the new behaviour will be present if: ./contracts/mycontract/mycontract.cpp and ./contracts/mycontract/helpers.cpp
resulting in compiling contract mycontract by linking together both mycontract.cpp and helpers.cpp source files.

Also included unit tests for both behaviours as well.

@enginterzi
Copy link

@prcolaco
I think this is a very good feature but it will fail if your .hpp files are in a different folder. If that is the case you should also add an include parameter with the folder name.

For example;
eosio-cpp -abigen -I ./include ....

@prcolaco
Copy link
Contributor Author

prcolaco commented Dec 3, 2020

@enginterzi I agree that this is needed, but I think it is a different issue, since different include directory was never supported anyway... but good idea to add. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants