cmake/Tests/FindPython/PyPy2/CMakeLists.txt

38 lines
1.1 KiB
CMake
Raw Normal View History

2020-08-30 11:54:41 +02:00
cmake_minimum_required(VERSION 3.1)
2021-09-14 00:13:48 +02:00
project(TestPyPy2 LANGUAGES C)
2020-08-30 11:54:41 +02:00
set (Python2_FIND_IMPLEMENTATIONS "PyPy")
find_package(Python2 COMPONENTS Interpreter Development)
if (NOT Python2_FOUND)
2021-09-14 00:13:48 +02:00
message (FATAL_ERROR "Failed to find Python PyPy 2")
2020-08-30 11:54:41 +02:00
endif()
if (NOT Python2_Interpreter_FOUND)
2021-09-14 00:13:48 +02:00
message (FATAL_ERROR "Failed to find Python PyPy 2 Interpreter")
2020-08-30 11:54:41 +02:00
endif()
if (NOT Python2_INTERPRETER_ID STREQUAL "PyPy")
message (FATAL_ERROR "Erroneous interpreter ID (${Python2_INTERPRETER_ID})")
endif()
if (NOT Python2_Development.Module_FOUND)
2021-09-14 00:13:48 +02:00
message (FATAL_ERROR "Failed to find Python PyPy 2 Development.Module")
2020-08-30 11:54:41 +02:00
endif()
if (NOT Python2_Development.Embed_FOUND)
2021-09-14 00:13:48 +02:00
message (FATAL_ERROR "Failed to find Python PyPy 2 Development.Embed")
2020-08-30 11:54:41 +02:00
endif()
if (NOT Python2_Development_FOUND)
2021-09-14 00:13:48 +02:00
message (FATAL_ERROR "Failed to find Python PyPy 2 Development")
2020-08-30 11:54:41 +02:00
endif()
if(NOT TARGET Python2::Interpreter)
message(SEND_ERROR "Python2::Interpreter not found")
endif()
if(NOT TARGET Python2::Module)
message(SEND_ERROR "Python2::Module not found")
endif()
if(NOT TARGET Python2::Python)
message(SEND_ERROR "Python2::Python not found")
endif()