DESTDIR no longer recognized for 'make install-mdrun' when using cmake - Redmine #555
Archive from user: Nicholas Breen
As of this writing, release-4.5-patches does not take into account $DESTDIR on a “make install-mdrun”, trying to install directly to CMAKE_INSTALL_PREFIX instead. It does work as expected for a full “make install”.
Steps:
mkdir build install
(cd build ; cmake .. -DCMAKE_INSTALL_PREFIX=“/usr”)
make -C build mdrun
make -C build install-mdrun DESTDIR=`pwd`/install
The tail end of that last command’s output:
Scanning dependencies of target install-mdrun
make[3]: Leaving directory `/tmp/gromacs-4.5.1+git20100909/build’
make[3]: Entering directory `/tmp/gromacs-4.5.1+git20100909/build’
[100%] Installing mdrun
Error copying file
“/tmp/gromacs-4.5.1+git20100909/build/src/kernel/mdrun” to
“/usr/bin/mdrun”.
make[3]: * [src/kernel/CMakeFiles/install-mdrun] Error 1
make[3]: Leaving directory `/tmp/gromacs-4.5.1+git20100909/build’
make[2]: * [src/kernel/CMakeFiles/install-mdrun.dir/all] Error 2
make[2]: Leaving directory `/tmp/gromacs-4.5.1+git20100909/build’
make[1]: * [src/kernel/CMakeFiles/install-mdrun.dir/rule] Error 2
make[1]: Leaving directory `/tmp/gromacs-4.5.1+git20100909/build’
make: * [install-mdrun] Error 2
make: Leaving directory `/tmp/gromacs-4.5.1+git20100909/build’
(from redmine: issue id 555, created on 2010-09-10 by gmxdefault, closed on 2010-09-10)
- Changesets:
- Revision 36133dbe by Teemu Murtola on 2010-10-18T10:47:18Z:
Use CMake install for install-mdrun (bugs #549, #555)
The custom target install-mdrun now invokes the cmake_install.cmake
script that is generated by CMake to perform the actual installation.
Adds support for DESTDIR and RPATH rewriting (see bug #570).
To implement this, all installation targets are now grouped into
components: "data" for shared data, "development" for headers and
pkgconfig files, "libraries" for libraries needed by mdrun, "mdrun" for
mdrun itself, and "runtime" for other binaries and libraries. Only
"mdrun" and "libraries" are used at the moment (the latter only when
installing with shared libraries).
Haven't tested this with Visual Studio, but if it doesn't work, it
should be easy to adapt.