CMakeLists.txt 934 B

12345678910111213141516171819202122232425262728293031
  1. cmake_minimum_required(VERSION 3.5)
  2. project(TestIronPython3 LANGUAGES NONE)
  3. set (Python3_FIND_IMPLEMENTATIONS "IronPython")
  4. find_package(Python3 COMPONENTS Interpreter Compiler)
  5. if (NOT Python3_FOUND)
  6. message (FATAL_ERROR "Failed to find Python 3")
  7. endif()
  8. if (NOT Python3_Interpreter_FOUND)
  9. message (FATAL_ERROR "Failed to find Python 3 Interpreter")
  10. endif()
  11. if (NOT Python3_INTERPRETER_ID STREQUAL "IronPython")
  12. message (FATAL_ERROR "Erroneous interpreter ID (${Python3_INTERPRETER_ID})")
  13. endif()
  14. if (NOT Python3_Compiler_FOUND)
  15. message (FATAL_ERROR "Failed to find Python 3 Compiler")
  16. endif()
  17. if (NOT Python3_COMPILER_ID STREQUAL "IronPython")
  18. message (FATAL_ERROR "Erroneous compiler ID (${Python3_COMPILER_ID})")
  19. endif()
  20. if(NOT TARGET Python3::Interpreter)
  21. message(SEND_ERROR "Python3::Interpreter not found")
  22. endif()
  23. if(NOT TARGET Python3::Compiler)
  24. message(SEND_ERROR "Python3::Compiler not found")
  25. endif()