|
|
|
@ -2,14 +2,16 @@
|
|
|
|
|
function(find_required_package pkg_name)
|
|
|
|
|
find_package(${pkg_name})
|
|
|
|
|
if(NOT ${pkg_name}_FOUND)
|
|
|
|
|
message(FATAL_ERROR "Required package ${pkg_name} not found, please install the package and try building MindSpore again.")
|
|
|
|
|
message(FATAL_ERROR "Required package ${pkg_name} not found, "
|
|
|
|
|
"please install the package and try building MindSpore again.")
|
|
|
|
|
endif()
|
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
|
|
function(find_required_program prog_name)
|
|
|
|
|
find_program(${prog_name}_EXE ${prog_name})
|
|
|
|
|
if(NOT ${prog_name}_EXE)
|
|
|
|
|
message(FATAL_ERROR "Required program ${prog_name} not found, please install the package and try building MindSpore again.")
|
|
|
|
|
message(FATAL_ERROR "Required program ${prog_name} not found, "
|
|
|
|
|
"please install the package and try building MindSpore again.")
|
|
|
|
|
endif()
|
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
|
@ -22,7 +24,7 @@ if (Python3_FOUND)
|
|
|
|
|
message("Python3 library path: ${Python3_LIBRARY}")
|
|
|
|
|
message("Python3 interpreter: ${Python3_EXECUTABLE}")
|
|
|
|
|
elseif(Python3_LIBRARY AND Python3_EXECUTABLE AND
|
|
|
|
|
${Python3_VERSION} VERSION_GREATER_EQUAL "3.7.0" AND ${Python3_VERSION} VERSION_LESS "3.8.0")
|
|
|
|
|
${Python3_VERSION} VERSION_GREATER_EQUAL "3.7.0" AND ${Python3_VERSION} VERSION_LESS "3.8.9")
|
|
|
|
|
message(WARNING "Maybe python3 environment is broken.")
|
|
|
|
|
message("Python3 library path: ${Python3_LIBRARY}")
|
|
|
|
|
message("Python3 interpreter: ${Python3_EXECUTABLE}")
|
|
|
|
@ -39,7 +41,8 @@ else ()
|
|
|
|
|
find_package(Patch)
|
|
|
|
|
endif()
|
|
|
|
|
if(NOT Patch_FOUND)
|
|
|
|
|
message(FATAL_ERROR "Patch not found, please set environment variable MS_PATCH_PATH to path where Patch is located, "
|
|
|
|
|
message(FATAL_ERROR "Patch not found, "
|
|
|
|
|
"please set environment variable MS_PATCH_PATH to path where Patch is located, "
|
|
|
|
|
"usually found in GIT_PATH/usr/bin on Windows")
|
|
|
|
|
endif()
|
|
|
|
|
message(PATCH_EXECUTABLE = ${Patch_EXECUTABLE})
|
|
|
|
|