mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-21 22:50:26 -06:00
@@ -16,6 +16,55 @@ else()
|
||||
set(USER_INCLUDE_DIR "/path/to/invalid/dir")
|
||||
endif()
|
||||
|
||||
# check some combinations for modules search without interpreter
|
||||
block(SCOPE_FOR VARIABLES)
|
||||
find_package(Python3 REQUIRED COMPONENTS Development.SABIModule)
|
||||
if (NOT Python3_FOUND)
|
||||
message (FATAL_ERROR "Failed to find Python 3")
|
||||
endif()
|
||||
if (Python3_Development_FOUND)
|
||||
message (FATAL_ERROR "Python 3, COMPONENT 'Development' unexpectedly found")
|
||||
endif()
|
||||
if (Python3_Interpreter_FOUND)
|
||||
message (FATAL_ERROR "Python 3, COMPONENT 'Interpreter' unexpectedly found")
|
||||
endif()
|
||||
if (Python3_Development.Embed_FOUND)
|
||||
message (FATAL_ERROR "Python 3, COMPONENT 'Development.Embed' unexpectedly found")
|
||||
endif()
|
||||
if (Python3_Development.Module_FOUND)
|
||||
message (FATAL_ERROR "Python 3, COMPONENT 'Development.Module' unexpectedly found")
|
||||
endif()
|
||||
if (NOT Python3_Development.SABIModule_FOUND)
|
||||
message (FATAL_ERROR "Python 3, COMPONENT 'Development.SABIModule' not found")
|
||||
endif()
|
||||
unset(_Python3_SABI_LIBRARY_RELEASE CACHE)
|
||||
endblock()
|
||||
|
||||
block(SCOPE_FOR VARIABLES)
|
||||
find_package(Python3 REQUIRED COMPONENTS Development.Module Development.SABIModule)
|
||||
if (NOT Python3_FOUND)
|
||||
message (FATAL_ERROR "Failed to find Python 3")
|
||||
endif()
|
||||
if (Python3_Development_FOUND)
|
||||
message (FATAL_ERROR "Python 3, COMPONENT 'Development' unexpectedly found")
|
||||
endif()
|
||||
if (Python3_Interpreter_FOUND)
|
||||
message (FATAL_ERROR "Python 3, COMPONENT 'Interpreter' unexpectedly found")
|
||||
endif()
|
||||
if (Python3_Development.Embed_FOUND)
|
||||
message (FATAL_ERROR "Python 3, COMPONENT 'Development.Embed' unexpectedly found")
|
||||
endif()
|
||||
if (NOT Python3_Development.Module_FOUND)
|
||||
message (FATAL_ERROR "Python 3, COMPONENT 'Development.Module' not found")
|
||||
endif()
|
||||
if (NOT Python3_Development.SABIModule_FOUND)
|
||||
message (FATAL_ERROR "Python 3, COMPONENT 'Development.SABIModule' not found")
|
||||
endif()
|
||||
unset(_Python3_LIBRARY_RELEASE CACHE)
|
||||
unset(_Python3_SABI_LIBRARY_RELEASE CACHE)
|
||||
endblock()
|
||||
|
||||
|
||||
set(components Interpreter Development)
|
||||
if (CMake_TEST_FindPython3_SABIModule AND WIN32)
|
||||
list (APPEND components Development.SABIModule)
|
||||
|
||||
Reference in New Issue
Block a user