forked from OSSInnovation/mindspore
cmake bug fix
This commit is contained in:
parent
1a518e1cff
commit
a42ebf2cbc
|
@ -1,13 +1,16 @@
|
||||||
# find exec
|
# find exec
|
||||||
find_package(Python3 3.7 COMPONENTS Interpreter Development)
|
find_package(Python3 3.7 COMPONENTS Interpreter Development)
|
||||||
if (NOT Python3_FOUND)
|
if (NOT Python3_FOUND)
|
||||||
message("No python3 found.")
|
message(FATAL_ERROR "No python3 found.")
|
||||||
return ()
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
set(PYTHON ${Python3_EXECUTABLE})
|
set(PYTHON ${Python3_EXECUTABLE})
|
||||||
set(PYTHON_VERSION ${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR})
|
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)
|
find_package(Git)
|
||||||
if (NOT GIT_FOUND)
|
if (NOT GIT_FOUND)
|
||||||
message("No git found.")
|
message("No git found.")
|
||||||
|
|
Loading…
Reference in New Issue