<div dir="ltr"><div>I used Makefile instead of cmake. It is working now and I can build the executable as required.<br><br><br></div><div>Thanks.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 16, 2014 at 8:16 PM, Anjaiah Nalaparaju <span dir="ltr">&lt;<a href="mailto:anjai.che@gmail.com" target="_blank">anjai.che@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div><div><div>Hi,<br><br></div>I want to have executable file 
for template.c, but not in the default location and not during the 
installation of whole package. I am trying to do this for gromacs-4.6.5.<br><br></div>When I use <br><br></div>$cd /home/user/Documents/<br><pre>$ tar xfz gromacs-4.6.5.tgz
$ cd gromacs-4.6.5
$ mkdir build
$ cd build<br>$ cmake .. -DGMX_MPI=ON -DGMX_GPU=OFF -DGMX_BUILD_OWN_FFTW=ON -DGMX_DEFAULT_SUFFIX=ON -DGMX_DOUBLE=ON -DCMAKE_INSTALL_PREFIX=/home/user/gromacs4.6.5/<br></pre><pre>$ make install<br></pre><pre>It installs gromacs package at /home/user/gromacs4.6.5/ and executable for template.c is at /home/user/Documents/gromacs4.6.5/build/share/template/.<br><br></pre><pre>What I want to do is, I want to build the executable file for template not during the installation of whole package. <br><br>I have copied the folder &quot;template&quot;distribution directory as /home/user/Documents/template/. Now I want to build the template using the already installed gromacs. <br><br>I have renamed the CMakeLists.txt.template to CMakeLists.txt. Then did source /home/user/gromacs4.6.5/bin/GMXRC.bash. When I used cmake to build executable I end-up with either of the following error.<br><br>-- checking for module &#39;libgmx_d&#39;<br>--   package &#39;libgmx_d&#39; not found<br>CMake Error at /usr/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):<br>  Could NOT find GROMACS (missing: GROMACS_LIBRARY GROMACS_INCLUDE_DIR)<br><br></pre><pre>or<br><br>  Could not find a package configuration file provided by &quot;GROMACS&quot; with any<br>  of the following names:<br><br>    GROMACSConfig.cmake<br>    gromacs-config.cmake<br><br>  Add the installation prefix of &quot;GROMACS&quot; to CMAKE_PREFIX_PATH or set<br>  &quot;GROMACS_DIR&quot; to a directory containing one of the above files.  If<br>  &quot;GROMACS&quot; provides a separate development package or SDK, be sure it has<br>  been installed.</pre>I tried the following but it still didn&#39;t work.<br><br>cmake -DGMX_MPI=ON -DGMX_GPU=OFF -DGMX_DEFAULT_SUFFIX=ON -DGMX_DOUBLE=ON -DCMAKE_LIBRARY_PATH=/home/cheanjai/gromacs4.6.5/lib/ -DCMAKE_INCLUDE_PATH=/home/cheanjai/gromacs4.6.5/include/gromacs/ -DCMAKE_PREFIX_PATH=/home/cheanjai/Documents/gromacs-4.6.5/ -DCMAKE_INSTALL_PREFIX=/home/cheanjai/Documents/template/<br><br><pre>Can anyone please guide me to build the executable for template.c in the different place using the already installed gromacs package. I think for the gromacs.4.5 this procedure is bit straight forward<br></pre><pre>by changing the Makefile we can get it. But for gromacs-4.6.5 seems not so straight forward.<br><br></pre><pre>Thanks in advance for your time and help.</pre><br><br></div>
</blockquote></div><br></div>