Added an option to easily compile contrib programs with cmake
authorRoland Schulz <roland@utk.edu>
Wed, 23 Nov 2011 07:27:51 +0000 (23:27 -0800)
committerRoland Schulz <roland@utk.edu>
Wed, 23 Nov 2011 07:40:21 +0000 (23:40 -0800)
Change-Id: Ib3fa2368c74c85bb733ba0d52e13e560134cfc5c

src/CMakeLists.txt
src/contrib/CMakeLists.txt [new file with mode: 0644]
src/contrib/README

index e802e652df282e88f0f70f763f03b69a86fcce59..f07b127abce58c996aceb42598ab600e4040c53f 100644 (file)
@@ -8,4 +8,5 @@ add_subdirectory(kernel)
 if(NOT GMX_FAHCORE)
   add_subdirectory(tools)
   add_subdirectory(ngmx)
+  add_subdirectory(contrib)
 endif(NOT GMX_FAHCORE)
diff --git a/src/contrib/CMakeLists.txt b/src/contrib/CMakeLists.txt
new file mode 100644 (file)
index 0000000..b43b007
--- /dev/null
@@ -0,0 +1,8 @@
+set(CONTRIB_PROGRAMS 
+     #add here any programs you want to compile
+)
+
+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)
index 7ce4ac39a8f30d946e1926a5f02485594a5528dc..b1b3e037e78721dd0bfac956de53f876a465c5ac 100644 (file)
@@ -4,24 +4,7 @@ GROMACS developers and users. It is not really officially supported
 or documented, so if there are problems your best bet is probably
 either the mailing lists or to contact the author listed in the file.
 
-To add a program, you should edit Makefile.am. Have a look at 
-www.gromacs.org/developer if you are unfamiliar with automake/autoconf.
-Since gromacs uses both assembly, fortran, shared libraries and 
-dynamic dependency tracking on all platforms we rely on features in
-the prereleases of autoconf 1.5. Until this is released,
-you can get version 1.4j or later from ftp.gromacs.org/developer
-
-The EXTRA_PROGRAMS tag used here means they are not compiled and
-installed for the default package configuration setup.
-
-You should always be able to execute the program in this directory,
-but it is not installed automatically. Since we use libtool to handle
-shared/static libraries the "program file" you see is actually a libtool
-wrapper script, and if you move this script it will not work. To install
-e.g. "options" as "/usr/local/gromacs/i686-pc-linux-gnu/bin/options"
-you should give the command:
-
-../../libtool install options /usr/local/gromacs/i686-pc-linux-gnu/bin/options
+To add a program, you should edit CMakeLists.txt.