[gmx-users] Linking contrib program issue

Michael Cristòfol Clough michaelcristofol at gmail.com
Thu Jul 23 11:27:31 CEST 2015


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


More information about the gromacs.org_gmx-users mailing list