From 701b9132efb6c46512b064f0e955f3bd13fa7fc3 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Fri, 2 Feb 2024 01:52:17 -0500 Subject: [PATCH] fix compile gromacs with precompiled C library (#3217) Fix #3214. In the gmx patch file, `${TENSORFLOW_ROOT}` is used other than `${TensorFlow_LIBRARY_PATH}$` or `${TENSORFLOW_INCLUDE_DIRS}`, so the fastest workaround is to set `${TENSORFLOW_ROOT}`. https://github.com/deepmodeling/deepmd-kit/blob/eb9b2efedf4efc946894800a0d7abf5056f4bb7a/source/gmx/patches/2020.2/CMakeLists.txt.patch.in#L14-L18 Signed-off-by: Jinzhe Zeng --- source/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index d6ee3d0958..a4971a4d2a 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -271,6 +271,7 @@ if(DEEPMD_C_ROOT) IMPORTED_LOCATION "${deepmd_c}" INTERFACE_INCLUDE_DIRECTORIES "${DEEPMD_INCLUDE_C_DIR}/deepmd") # use variable for TF path to set deepmd_c path + set(TENSORFLOW_ROOT "${DEEPMD_C_ROOT}") set(TensorFlow_LIBRARY_PATH "${DEEPMD_C_ROOT}/lib") set(TENSORFLOW_INCLUDE_DIRS "${DEEPMD_C_ROOT}/include") set(TORCH_LIBRARIES "${DEEPMD_C_ROOT}/lib/libtorch.so")