the CMake generated install-mdrun rule does not depend on the mdrun target
The CMake generated install-mdrun rules does not have a depencency on the mdrun[-gpu] binary itseld. Therefor one has to do make mdrun first and can only install afterward. Moreover, one runs the risk of installing an outdated binary when the source gets updated.
$ cd GMX_CLEAN_BUILD_DIR
$ cmake GMX_SOURCE_DIR
$ $ make install-mdrun
Scanning dependencies of target install-mdrun
-- Install configuration: "Release"
-- Install component: "mdrun"
CMake Error at cmake_install.cmake:40 (FILE):
file INSTALL cannot find
Call Stack (most recent call first):
make3: * [src/kernel/CMakeFiles/install-mdrun] Error 1
make2: [src/kernel/CMakeFiles/install-mdrun.dir/all] Error 2
make1: [src/kernel/CMakeFiles/install-mdrun.dir/rule] Error 2
make: * [install-mdrun] Error 2