jannotti / cpp-algorand-sdk

Unofficial Algorand C++ SDK.
MIT License
14 stars 6 forks source link

Restructure Repo and Add CMake Build System #6

Open avislash opened 3 years ago

avislash commented 3 years ago

I want to propose that we restructure the repo so that all of the header files are contained within an include directory, source files are within a src directory and that tests are within a test directory.

After restructuring I propose that we swap out the current makefile for a CMake build system.

This change will allow the SDK to be presented as a cohesive library that can be checked out and easily integrated into any IDE or development environment and built with CMake. The CMake build system will take all of the files in this repo and produce a single library called libAlgo++ (I'm open to suggestions on the library name).

avislash commented 3 years ago

Hi @jannotti, any thoughts on the proposed changes above?

jannotti commented 3 years ago

I don't really see the point. C++ appears to lack any sort of strong convention on packaging libraries. Where I've used this, I've just copied the one directory into place. It's not great, but it's not that bad either. I've tried hard to become convinced, but I read just as much about cmake, as scons, and bazel. If a simple Makefile is enough, I'd rather keep it that way.

avislash commented 3 years ago

H @jannotti, just wanted to circle back on this.

There are a couple of reasons I'm advocating for a CMake build system:

  1. It will allow those already using a Make file system to still use this as the CMake will generate a Makefile to compile the library
  2. It will allow those using CMake already to automatically integrate and it's also cooperative with other build systems such as ninja
  3. As we move towards a more cohesive unit testing framework for the C++ SDK and align it with something like Pickle as Ryan suggested in the other GH issue then we can integrate this with those frameworks since they also use a CMake build system.

If after this you still don't think this is the right direction then I'm happy to concede. close this issue, and keep things the way they are.

Thanks, Avi