What is a good structure for module Integration through Cmake -


i trying integrate few different projects we've been making through cmake. in general, projects not uniformly laid out, have similarities. each library, library typically has test code/executable want maintain...and can have own inter-dependencies. in addition these libraries have been being maintained in separate repositories (mercurial if makes difference). interdependence of files this:

  • library independent
  • library b independent
  • library c independent
  • library e depends on a,b,c
  • executable 1 depends on c
  • executable 2 depends on e
  • executable 3 depends on e

so each library laid out this

+ librarya\ | + cmakelists.txt | + librarya | | + cmakelists.txt | | + include\ | | | header.h | | + source\ | | | lib.cpp | + test\ | | + cmakelists.txt | | main.cpp 

and overarching structure is

+ root\ | + cmakelists.txt | + librarya\ | + libraryb\ | + libraryc\ | + librarye\ | + executable1\ | + executable2\ | + executable3\ 

with each folder being own subdirs project. structure make sense cmake? how maintain dependencies between these projects? (if change a, executable 3 should rebuild)?

it makes sense you're trying do. , can cmake, though may not obvious how well. went through same thing while ago, , wrote question here, followed answer outlining eventual solution:

cmake: how best build multiple (optional) subprojects?


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -