Skip to content

Commit

Permalink
cmake: skip executing python when cross compiling (#2876)
Browse files Browse the repository at this point in the history
When cross compiling, TensorFlow cannot be imported. TENSORFLOW_ROOT
needs to be given manually.

This commit has been patched in
conda-forge/deepmd-kit-feedstock#57
  • Loading branch information
njzjz authored Sep 30, 2023
1 parent a184e3b commit 9af26fb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions source/cmake/Findtensorflow.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ endif()

if(BUILD_CPP_IF
AND USE_TF_PYTHON_LIBS
AND NOT CMAKE_CROSSCOMPILING
AND NOT SKBUILD
AND NOT INSTALL_TENSORFLOW)
# Here we try to install libtensorflow_cc.so as well as
Expand Down

0 comments on commit 9af26fb

Please sign in to comment.