jeudi 29 novembre 2018

CMake & C++ - What is the best approach to share library between several git submodules

I am working with large C++ project (using cLion) which containing 4 submodules. I wrote small C++ library which provides the ability to read from .properties file (most common in Java..).

The "Application.properties" file should includes common variables and per-project variables. For example; I am using Elasticsearch database and all the 4 sub-modules should know his address. In addition, Since i have 4 foreign projects i need to maintenance constantly 5 different CMakeLists files ( 4 sub-modules 1 for the main project).

My solution is to set the shared code in the main project root and using it by include the library in per project.

  • The project & submodules version control is git. I thought about it and decided that maybe I should check for more reviews before I started writing.

With Gratitude, Kobi.

Aucun commentaire:

Enregistrer un commentaire