Skip to content

Commit

Permalink
fix(cmake): fix USE_PT_PYTHON_LIBS (deepmodeling#3972)
Browse files Browse the repository at this point in the history
There was a typo in deepmodeling#3636.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Updated build configuration to improve compatibility with PyTorch by
modifying library path settings.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
  • Loading branch information
njzjz authored and mtaillefumier committed Sep 18, 2024
1 parent d71ce3e commit d6e7a03
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,7 @@ if(BUILD_CPP_IF
"Cannot determine PyTorch CMake prefix path, error code: $PYTORCH_CMAKE_PREFIX_PATH_RESULT_VAR}, error message: ${PYTORCH_CMAKE_PREFIX_PATH_ERROR_VAR}"
)
endif()
list(APPEND BACKEND_LIBRARY_PATH ${TensorFlow_LIBRARY_PATH})
if(Protobuf_LIBRARY_DIRECTORY)
list(APPEND BACKEND_LIBRARY_PATH ${Protobuf_LIBRARY_DIRECTORY})
endif()
list(APPEND CMAKE_PREFIX_PATH ${PYTORCH_CMAKE_PREFIX_PATH})
endif()
if(ENABLE_PYTORCH AND NOT DEEPMD_C_ROOT)
find_package(Torch REQUIRED)
Expand Down

0 comments on commit d6e7a03

Please sign in to comment.