Uniform and less verbose startup for all binaries.
authorTeemu Murtola <teemu.murtola@gmail.com>
Sat, 29 Jun 2013 12:24:39 +0000 (15:24 +0300)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Fri, 19 Jul 2013 15:25:43 +0000 (17:25 +0200)
commit6ff9572c6937d40d06ec02e673de020b25a590e5
tree5ee8dd1853f1bd5aebb090d05451a0fa1e66c2f7
parent4862ac7825ce80729faee90e4f78b668104789f7
Uniform and less verbose startup for all binaries.

Now all binaries call gmx::ProgramInfo::init() as more or less the first
thing.  Removed set_program_name() as unnecessary, since the above call
does all that.  Make CommandLineModuleManager responsible of also
printing any common startup header, and add a method to suppress this
stderr output in unit tests.

Replace CopyRight() with a less verbose method and move the
responsibility of calling it to parse_common_args().
Added a PCA_STANDALONE flag for parse_common_args() to know when to do
this (can be removed once all programs are part of the wrapper binary).

Left the CopyRight() function still there, in case we want to add a
-license command-line option or similar to print that information.
Currently, it is not called from anywhere.  Removed GMX_NO_CREDITS and
some other unnecessary code from CopyRight().

Most stuff in contrib is broken by this.  There may be more changes
coming to the initialization sequence, and it will be simple to adapt
those programs that people want to get working again, but it is not
worth doing it more than once.

Part of #1209.

Change-Id: I5403dd259ab5f314cce3283aac275a6c26d4818d
14 files changed:
src/gromacs/commandline/cmdlinemodulemanager.cpp
src/gromacs/commandline/cmdlinemodulemanager.h
src/gromacs/commandline/tests/cmdlinemodulemanager.cpp
src/gromacs/gmxana/gmx_pme_error.cpp
src/gromacs/gmxlib/copyrite.cpp
src/gromacs/gmxlib/statutil.cpp
src/gromacs/legacyheaders/copyrite.h
src/gromacs/legacyheaders/statutil.h
src/gromacs/trajectoryanalysis/cmdlinerunner.cpp
src/gromacs/utility/programinfo.cpp
src/ngmx/g_xrama.cpp
src/ngmx/ngmx.cpp
src/programs/gmx/gmx.cpp
src/programs/mdrun/mdrun.cpp