Browse Source

!3188 cmake bug fix

Merge pull request !3188 from liubuyu/dev
tags/v0.6.0-beta
mindspore-ci-bot Gitee 5 years ago
parent
commit
b57abc3896
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      cmake/package_script.cmake

+ 5
- 2
cmake/package_script.cmake View File

@@ -1,13 +1,16 @@
# find exec
find_package(Python3 3.7 COMPONENTS Interpreter Development)
if (NOT Python3_FOUND)
message("No python3 found.")
return ()
message(FATAL_ERROR "No python3 found.")
endif ()

set(PYTHON ${Python3_EXECUTABLE})
set(PYTHON_VERSION ${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR})

if (NOT PYTHON_VERSION MATCHES "3.7")
message(FATAL_ERROR "FIND PYTHON VERSION ${PYTHON_VERSION} BUT CAN NOT MATCH PYTHON VERSION 3.7")
endif ()

find_package(Git)
if (NOT GIT_FOUND)
message("No git found.")


Loading…
Cancel
Save