eoslime icon indicating copy to clipboard operation
eoslime copied to clipboard

Feature compile multi sources in a subfolder

Open prcolaco opened this issue 5 years ago • 2 comments

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.

prcolaco avatar Sep 17 '20 01:09 prcolaco

@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 ....

enginterzi avatar Dec 02 '20 05:12 enginterzi

@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. 👍

prcolaco avatar Dec 03 '20 14:12 prcolaco