opencog / cogutil

Very low-level C++ programming utilities used by several components

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Organise OpenCog .cmake files

vsbogd opened this issue · comments

Raising this issue here as it is across many opencog repos but most of the changes should be done in cogutil package.

  1. .cmake find-module packages for 3rd party libs are copied and duplicated in few repositories. For instance opencog/atomspace/lib and opencog/opencog/lib contains FindProtobuf, FindPython, FindGuile, etc modules. It leads to code duplication and necessity fixing modules in each repository independently.

    All of such modules should be copied in single place. For instance we can keep them in opencog/cogutil repo, install them during cogutil installation and use installed versions from other repositories.

  1. .cmake find-module packages for OpenCog modules (for instance FindAtomspace.cmake) should be located near the library code.

    They should be kept in the repo which contains corresponding library and installed with the library. It makes sense to convert them into config-file packages (difference between find-module and config-file packages is described here) to make them compatible with 3rd party software which uses OpenCog as upstream.

I like it.

PRs #120 and opencog/atomspace#1832 fixed issue for opencog/cogutil and opencog/atomspace.
Repositories left:

  • opencog/opencog
  • opencog/moses
  • opencog/benchmark
  • opencog/as-moses

as well.

  • opencog/agi-bio

as well

I'm sort-of changing my mind as to whether I like it or not. I see what's good about the proposal, and I like that -- it moves all similar files to one central location. But there's also bad things about this: the files move to somewhere far away from the users of the files. It makes sense if there are multiple users, and one provider. But for many of these files, there is only one user (and there will only ever be one user) and so increasing the distance between user and provider does not seem like a good idea.

Hi @linas, one argument I see is that when one is going to add new Find*.cmake tool he or she doesn't need search all repos and check if it is already here. Ideally these files should be a part of 3rd party library itself and it is not a part of code which uses it. So my idea was to move this files into utility library to allow using them from all other project if it is needed. cmake-data Ubuntu package does the same thing. It provides Find*.cmake scripts for third party libraries (SDL for instance).

In addition according #121 (comment) remove files: FindGSL.cmake, FindIODBC.cmake, FindLibMemCached.cmake, FindSDL_gfx.cmake

I just run dpkg -L cmake-data | grep -E "/Find(.)+.cmake" on ubuntu 14.04, for cmake version 2.8.12.2, and it seems we might not need some of the Find*.cmakes, eg protobuf, cxxtest

@amebel, we can check this, there is a probability that custom Find*.cmake files have some extra functionality. And may be some other non-Ubuntu users doesn't have similar package. But in general I agree that it is better to stick to standard Find*.cmake utils.

Is this done? See also issue #126

Only opencog/benchmark repo is still not migrated to the new cmake Find* scripts. All other repos are migrated.

closing. benchmark is migrated