Skip to content
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

Improve handling of cmake includes across contract families #60

Open
cmickeyb opened this issue Sep 12, 2024 · 0 comments
Open

Improve handling of cmake includes across contract families #60

cmickeyb opened this issue Sep 12, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@cmickeyb
Copy link
Contributor

One of the nice things about the PDO contracts setup is that we can share contract methods across contract families (e.g. the digital asset family borrows several methods from the token object and token issuer contracts in the exchange family). To handle method definitions the root CMakeLists.txt file explicitly adds a couple of the contract families to the include path. I would like to propose that we remove those explicit paths and replace it with a generic include at the top level of the contract family directory. This would mean changing the CMakeLists.txt in each of the contract families. Specifically, the following kind of change would be necessary:

Before:
INCLUDE(exchange_common)

After:
INCLUDE(exchange-contract/common)

(Note that this presumes that we would also change the name of exchange_common.cmake to common.cmake. The rationale for that is described in a separate issue.)

This change should make it easier for new contract families to share methods without changing the behavior of the project-wide build system. This would simplify independent development of contract families (e.g. including contract families as submodules in the pdo-contract tree).

@cmickeyb cmickeyb added the enhancement New feature or request label Sep 12, 2024
@cmickeyb cmickeyb self-assigned this Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant