mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-26 00:20:06 -06:00
Add the following variables: * Python_EXECUTABLE_DEBUG * Python_INTERPRETER * Python_DEBUG_POSTFIX and target Python::InterpreterDebug. python_add_library() command Manage DEBUG_POSTFIX target property based on the value of Python_DEBUG_POSTFIX variable. Fixes: #25874
25 lines
892 B
CMake
25 lines
892 B
CMake
cmake_minimum_required(VERSION 3.15)
|
|
|
|
project(TestArtifactsInteractive LANGUAGES C)
|
|
|
|
set (components Interpreter Development)
|
|
if (CMake_TEST_FindPython3_NumPy)
|
|
list (APPEND components NumPy)
|
|
endif()
|
|
|
|
find_package(Python3 REQUIRED COMPONENTS ${components})
|
|
|
|
if (Python3_ARTIFACTS_INTERACTIVE)
|
|
if (NOT DEFINED CACHE{Python3_EXECUTABLE}
|
|
OR NOT DEFINED CACHE{Python3_LIBRARY} OR NOT DEFINED CACHE{Python3_INCLUDE_DIR}
|
|
OR (CMake_TEST_FindPython3_NumPy AND NOT DEFINED CACHE{Python3_NumPy_INCLUDE_DIR}))
|
|
message (FATAL_ERROR "Python3_ARTIFACTS_INTERACTIVE=ON Failed.")
|
|
endif()
|
|
else()
|
|
if (DEFINED CACHE{Python3_EXECUTABLE}
|
|
OR DEFINED CACHE{Python3_LIBRARY} OR DEFINED CACHE{Python3_INCLUDE_DIR}
|
|
OR (CMake_TEST_FindPython3_NumPy AND DEFINED CACHE{Python3_NumPy_INCLUDE_DIR}))
|
|
message (FATAL_ERROR "Python3_ARTIFACTS_INTERACTIVE=OFF Failed.")
|
|
endif()
|
|
endif()
|