[gmx-users] Linking contrib program issue
Michael Cristòfol Clough
michaelcristofol at gmail.com
Fri Jul 24 15:15:57 CEST 2015
Hi Mark,
Thank you for your reply. I modified template and it worked ok, but I
wanted to do it properly so that I can add more analysis tools. I'm quite a
newbie with Cmake and where I'm having trouble is adding more programes to
the CMake files. I'll look into it more, thank you.
Regards,
Michael
On 24 July 2015 at 13:41, Mark Abraham <mark.j.abraham at gmail.com> wrote:
> Hi,
>
> Contrib is somewhere we put code that someone might find a use for, but we
> do no work on it, so it's probably all broken.
>
> For things like building your own analysis tool, check out the machinery in
> share/template
>
> Mark
>
> On Thu, Jul 23, 2015 at 11:28 AM Michael Cristòfol Clough <
> michaelcristofol at gmail.com> wrote:
>
> > Hello everyone,
> >
> > A few months ago I wrote a program for gromos and I want to rewrite it
> for
> > gromacs now. I was able to link the external xdr library to a simple
> > program but in order to acces information in the topology I would like to
> > link my program with the rest of gromacs, here is where I'm in trouble, I
> > can't compile and install my program with the rest of gromacs. What I
> > expected when I read the README file in the contrib directory was that I
> > simply had to add my program's name, e.g. FOO.c, in the CMakeLists.txt,
> > leaving it like this:
> >
> > set(CONTRIB_PROGRAMS
> > FOO
> > )
> >
> > foreach(PROG ${CONTRIB_PROGRAMS})
> > add_executable(${PROG} ${PROG}.c ${NGMX_COMMON_SOURCE})
> > set_target_properties(${PROG} PROPERTIES OUTPUT_NAME
> > "${PROG}${GMX_BINARY_SUFFIX}")
> > endforeach(PROG)
> >
> > But it didn't work.
> >
> > One of the things I tried, to discart errors of my program, was to try to
> > use existing programs in the contrib directory and add them to the
> > CMakeLists.txt, but I couldn't compile them either.
> >
> > I supose there's a simple way to do this. I would really appreciate it if
> > someone could give me a hand, telling me the usual procedure or with a
> link
> > to some reference material I could look at. I hope I'm not asking for too
> > much.
> >
> > Best regards,
> >
> > Michael
> > --
> > Gromacs Users mailing list
> >
> > * Please search the archive at
> > http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> > posting!
> >
> > * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
> >
> > * For (un)subscribe requests visit
> > https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> > send a mail to gmx-users-request at gromacs.org.
> >
> --
> Gromacs Users mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> send a mail to gmx-users-request at gromacs.org.
More information about the gromacs.org_gmx-users
mailing list