Skip to content

Commit

Permalink
fix a cmakelist bug, find python first then find TF
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Dec 14, 2022
1 parent 6de265a commit e4e4e91
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ else()
message(STATUS "Will not build AMD GPU support")
endif (USE_ROCM_TOOLKIT)

# setup tensorflow libraries by python
if (USE_TF_PYTHON_LIBS)
find_package (Python COMPONENTS Interpreter Development REQUIRED)
endif(USE_TF_PYTHON_LIBS)

#define USE_ASCEND, find tensorflow abi info
if (USE_ASCEND)
add_definitions("-DHUAWEI_ASCEND")
Expand Down Expand Up @@ -154,14 +159,6 @@ endif(USE_ASCEND AND BUILD_CPP_IF)

set(DEEPMD_SOURCE_DIR ${PROJECT_SOURCE_DIR}/..)

# setup tensorflow libraries by python
if (USE_TF_PYTHON_LIBS)
find_package (Python COMPONENTS Interpreter Development REQUIRED)
endif(USE_TF_PYTHON_LIBS)

# find tensorflow, I need tf abi info
find_package(tensorflow REQUIRED)

# find threads
find_package(Threads)

Expand Down

0 comments on commit e4e4e91

Please sign in to comment.