Fix grompp .edr IO estimate for free-energy calcs
[alexxy/gromacs.git] / CMakeLists.txt
index 18152b051bcd2d23d1caf62615f1ac91f9be09d7..4f4088153535b8cb58c9400ed3bb08ffffcda0f0 100644 (file)
@@ -105,6 +105,9 @@ set(API_VERSION ${NUM_VERSION})
 if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND UNIX)
     set(CMAKE_INSTALL_PREFIX "/usr/local/gromacs" CACHE STRING "Installation prefix (installation will need write permissions here)" FORCE)
 endif()
+if("${CMAKE_INSTALL_PREFIX}" STREQUAL "${CMAKE_BINARY_DIR}")
+    message(FATAL_ERROR "GROMACS cannot be installed into the build tree, choose a different location for CMAKE_INSTALL_PREFIX")
+endif()
 
 include(gmxBuildTypeReference)
 include(gmxBuildTypeTSAN)