mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-21 13:48:33 -05:00
@@ -20,3 +20,19 @@ if (Python3_Development_FOUND AND Python3_SOABI)
|
||||
message(FATAL_ERROR "Module suffix do not include Python3_SOABI")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
find_package(Python2 COMPONENTS ${CMake_TEST_FindPython_COMPONENT})
|
||||
if(NOT DEFINED Python2_SOABI)
|
||||
message(FATAL_ERROR "Python2_SOABI for ${CMake_TEST_FindPython_COMPONENT} not found")
|
||||
endif()
|
||||
|
||||
if (Python2_Development_FOUND AND Python2_SOABI)
|
||||
Python2_add_library (spam2 MODULE WITH_SOABI ../spam.c)
|
||||
target_compile_definitions (spam2 PRIVATE PYTHON2)
|
||||
|
||||
get_property (suffix TARGET spam2 PROPERTY SUFFIX)
|
||||
if (NOT suffix MATCHES "^.${Python2_SOABI}")
|
||||
message(FATAL_ERROR "Module suffix do not include Python2_SOABI")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user