CMakeLists.txt 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. cmake_minimum_required(VERSION 3.1)
  2. project(TestPyPy3 C)
  3. set (Python3_FIND_IMPLEMENTATIONS "PyPy")
  4. find_package(Python3 COMPONENTS Interpreter Development)
  5. if (NOT Python3_FOUND)
  6. message (FATAL_ERROR "Fail to found Python PyPy 3")
  7. endif()
  8. if (NOT Python3_Interpreter_FOUND)
  9. message (FATAL_ERROR "Fail to found Python PyPy 3 Interpreter")
  10. endif()
  11. if (NOT Python3_INTERPRETER_ID STREQUAL "PyPy")
  12. message (FATAL_ERROR "Erroneous interpreter ID (${Python3_INTERPRETER_ID})")
  13. endif()
  14. if (NOT Python3_Development.Module_FOUND)
  15. message (FATAL_ERROR "Fail to found Python PyPy 3 Development.Module")
  16. endif()
  17. if (NOT Python3_Development.Embed_FOUND)
  18. message (FATAL_ERROR "Fail to found Python PyPy 3 Development.Embed")
  19. endif()
  20. if (NOT Python3_Development_FOUND)
  21. message (FATAL_ERROR "Fail to found Python PyPy 3 Development")
  22. endif()
  23. if(NOT TARGET Python3::Interpreter)
  24. message(SEND_ERROR "Python3::Interpreter not found")
  25. endif()
  26. if(NOT TARGET Python3::Module)
  27. message(SEND_ERROR "Python3::Module not found")
  28. endif()
  29. if(NOT TARGET Python3::Python)
  30. message(SEND_ERROR "Python3::Python not found")
  31. endif()