Make data file path search more reusable
authorTeemu Murtola <teemu.murtola@gmail.com>
Thu, 15 Jan 2015 19:53:16 +0000 (21:53 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Tue, 20 Jan 2015 18:56:16 +0000 (19:56 +0100)
commit16c1f75544ed83e3eef088b30af69f673aec25aa
tree8883ddc2830827be5f6cd2436a9128f362e68f5f
parent68fc31308adc8b2e35fd1390e6a508446427d845
Make data file path search more reusable

Instead of returning the path to share/top from ProgramContextInterface,
return the installation prefix.  Make it the responsibility of the
caller to append the relative path to the data files it needs.  Clean up
config.h defines related to this to make them more generic.

This makes it possible to reuse the same logic to find files also in
other locations than share/top.  DataFileFinder is not yet similarly
reusable, but that is a topic for another change.

Change-Id: I7c7fc3730417e71ff43d1b6fadf00a0eb465d794
CMakeLists.txt
src/config.h.cmakein
src/gromacs/commandline/cmdlineprogramcontext.cpp
src/gromacs/commandline/cmdlineprogramcontext.h
src/gromacs/gmxlib/copyrite.cpp
src/gromacs/utility/datafilefinder.cpp
src/gromacs/utility/programcontext.cpp
src/gromacs/utility/programcontext.h
src/gromacs/utility/stringutil.h
src/testutils/testinit.cpp