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 563f312 commit d0261d5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,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 @@ -123,11 +128,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)

if (TENSORFLOW_VERSION VERSION_GREATER_EQUAL 2.10)
set (CMAKE_CXX_STANDARD 17)
elseif (TENSORFLOW_VERSION VERSION_GREATER_EQUAL 2.7)
Expand Down

0 comments on commit d0261d5

Please sign in to comment.