You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

check_requirements.cmake 1.5 kB

123456789101112131415161718192021222324252627282930313233343536373839
  1. ## define customized find fucntions, print customized error messages
  2. function(find_required_package pkg_name)
  3. find_package(${pkg_name})
  4. if (NOT ${pkg_name}_FOUND)
  5. message(FATAL_ERROR "Required package ${pkg_name} not found, please install the package and try building mindspore_serving again.")
  6. endif()
  7. endfunction()
  8. ## find python, quit if the found python is static
  9. set(Python3_USE_STATIC_LIBS FALSE)
  10. find_package(Python3 COMPONENTS Interpreter Development)
  11. if (Python3_FOUND)
  12. message("Python3 found, version: ${Python3_VERSION}")
  13. message("Python3 library path: ${Python3_LIBRARY_DIRS}")
  14. message("Python3 interpreter: ${Python3_EXECUTABLE}")
  15. else()
  16. message(FATAL_ERROR "Python3 not found, please install Python>=3.7.5, and set --enable-shared "
  17. "if you are building Python locally")
  18. endif ()
  19. ## packages used both on windows and linux
  20. if (DEFINED ENV{MS_PATCH_PATH})
  21. find_program(Patch_EXECUTABLE patch PATHS $ENV{MS_PATCH_PATH})
  22. set(Patch_FOUND ${Patch_EXECUTABLE})
  23. else ()
  24. find_package(Patch)
  25. endif ()
  26. if (NOT Patch_FOUND)
  27. message(FATAL_ERROR "Patch not found, please set environment variable MS_PATCH_PATH to path where Patch is located, "
  28. "usually found in GIT_PATH/usr/bin on Windows")
  29. endif ()
  30. message(PATCH_EXECUTABLE = ${Patch_EXECUTABLE})
  31. find_required_package(Threads)
  32. ## packages used on Linux
  33. if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
  34. find_required_package(OpenSSL)
  35. endif()

A lightweight and high-performance service module that helps MindSpore developers efficiently deploy online inference services in the production environment.