ArtifactsInteractive.cmake 827 B

12345678910111213141516171819202122
  1. enable_language(C)
  2. set (components Interpreter Development)
  3. if (CMake_TEST_FindPython3_NumPy)
  4. list (APPEND components NumPy)
  5. endif()
  6. find_package(Python3 REQUIRED COMPONENTS ${components})
  7. if (Python3_ARTIFACTS_INTERACTIVE)
  8. if (NOT DEFINED CACHE{Python3_EXECUTABLE}
  9. OR NOT DEFINED CACHE{Python3_LIBRARY} OR NOT DEFINED CACHE{Python3_INCLUDE_DIR}
  10. OR (CMake_TEST_FindPython3_NumPy AND NOT DEFINED CACHE{Python3_NumPy_INCLUDE_DIR}))
  11. message (FATAL_ERROR "Python3_ARTIFACTS_INTERACTIVE=ON Failed.")
  12. endif()
  13. else()
  14. if (DEFINED CACHE{Python3_EXECUTABLE}
  15. OR DEFINED CACHE{Python3_LIBRARY} OR DEFINED CACHE{Python3_INCLUDE_DIR}
  16. OR (CMake_TEST_FindPython3_NumPy AND DEFINED CACHE{Python3_NumPy_INCLUDE_DIR}))
  17. message (FATAL_ERROR "Python3_ARTIFACTS_INTERACTIVE=OFF Failed.")
  18. endif()
  19. endif()