From 9b45210b052c7c81ab84313c4a3b537e66c2a7b7 Mon Sep 17 00:00:00 2001 From: Marc Chevrier Date: Thu, 29 Jun 2023 15:11:12 +0200 Subject: FindPython: Add tests for IronPython v3 --- Modules/FindPython/Support.cmake | 4 +- Tests/CMakeLists.txt | 6 +- Tests/FindPython/CMakeLists.txt | 141 +++++++++++++++++++++++----- Tests/FindPython/IronPython3/CMakeLists.txt | 31 ++++++ 4 files changed, 154 insertions(+), 28 deletions(-) create mode 100644 Tests/FindPython/IronPython3/CMakeLists.txt diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake index 76d4a9b..0f0e2af 100644 --- a/Modules/FindPython/Support.cmake +++ b/Modules/FindPython/Support.cmake @@ -981,7 +981,7 @@ function (_PYTHON_VALIDATE_COMPILER) # retrieve python environment version from compiler set (working_dir "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/PythonCompilerVersion.dir") - file (WRITE "${working_dir}/version.py" "import sys; sys.stdout.write('.'.join([str(x) for x in sys.version_info[:3]]))\n") + file (WRITE "${working_dir}/version.py" "import sys; sys.stdout.write('.'.join([str(x) for x in sys.version_info[:3]])); sys.stdout.flush()\n") execute_process (COMMAND ${launcher} "${_${_PYTHON_PREFIX}_COMPILER}" ${_${_PYTHON_PREFIX}_IRON_PYTHON_COMPILER_ARCH_FLAGS} /target:exe /embed "${working_dir}/version.py" @@ -2520,7 +2520,7 @@ if ("Compiler" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS) # retrieve python environment version from compiler _python_get_launcher (_${_PYTHON_PREFIX}_COMPILER_LAUNCHER COMPILER) set (_${_PYTHON_PREFIX}_VERSION_DIR "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/PythonCompilerVersion.dir") - file (WRITE "${_${_PYTHON_PREFIX}_VERSION_DIR}/version.py" "import sys; sys.stdout.write('.'.join([str(x) for x in sys.version_info[:3]]))\n") + file (WRITE "${_${_PYTHON_PREFIX}_VERSION_DIR}/version.py" "import sys; sys.stdout.write('.'.join([str(x) for x in sys.version_info[:3]])); sys.stdout.flush()\n") execute_process (COMMAND ${_${_PYTHON_PREFIX}_COMPILER_LAUNCHER} "${_${_PYTHON_PREFIX}_COMPILER}" ${_${_PYTHON_PREFIX}_IRON_PYTHON_COMPILER_ARCH_FLAGS} /target:exe /embed "${_${_PYTHON_PREFIX}_VERSION_DIR}/version.py" diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 914ebce..2a7c839 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1557,15 +1557,17 @@ if(BUILD_TESTING) endif() if(CMake_TEST_FindPython_IronPython) set(CMake_TEST_FindPython2_IronPython TRUE) + set(CMake_TEST_FindPython3_IronPython TRUE) endif() if(CMake_TEST_FindPython_PyPy) set(CMake_TEST_FindPython2_PyPy TRUE) set(CMake_TEST_FindPython3_PyPy TRUE) endif() - if(CMake_TEST_FindPython2 OR CMake_TEST_FindPython2 + if(CMake_TEST_FindPython2 OR CMake_TEST_FindPython3 OR CMake_TEST_FindPython2_SABIModule OR CMake_TEST_FindPython3_SABIModule OR CMake_TEST_FindPython2_NumPy OR CMake_TEST_FindPython3_NumPy - OR CMake_TEST_FindPython3_Conda OR CMake_TEST_FindPython2_IronPython + OR CMake_TEST_FindPython3_Conda + OR CMake_TEST_FindPython2_IronPython OR CMake_TEST_FindPython3_IronPython OR CMake_TEST_FindPython2_PyPy OR CMake_TEST_FindPython3_PyPy) if (CMake_TEST_FindPython2 AND CMAKE_SYSTEM_NAME MATCHES "Linux|Darwin") set(CMake_TEST_FindPython2_SABIModule TRUE) diff --git a/Tests/FindPython/CMakeLists.txt b/Tests/FindPython/CMakeLists.txt index 3e1993e..bb9bef0 100644 --- a/Tests/FindPython/CMakeLists.txt +++ b/Tests/FindPython/CMakeLists.txt @@ -557,21 +557,21 @@ if(CMake_TEST_FindPython3_Conda) endif() if (CMake_TEST_FindPython2 AND CMake_TEST_FindPython2_IronPython) - add_test(NAME FindPython.Implementation.CPython COMMAND + add_test(NAME FindPython.Implementation.CPython2 COMMAND ${CMAKE_CTEST_COMMAND} -C $ --build-and-test "${CMake_SOURCE_DIR}/Tests/FindPython/Implementation" - "${CMake_BINARY_DIR}/Tests/FindPython/Implementation.CPython" + "${CMake_BINARY_DIR}/Tests/FindPython/Implementation.CPython2" ${build_generator_args} --build-project TestImplementationCPython --build-options ${build_options} -DPython_REQUESTED_VERSION=2 -DPython_REQUESTED_IMPLEMENTATIONS=CPython --test-command ${CMAKE_CTEST_COMMAND} -V -C $ ) - add_test(NAME FindPython.Implementation.IronPython COMMAND + add_test(NAME FindPython.Implementation.IronPython2 COMMAND ${CMAKE_CTEST_COMMAND} -C $ --build-and-test "${CMake_SOURCE_DIR}/Tests/FindPython/Implementation" - "${CMake_BINARY_DIR}/Tests/FindPython/Implementation.IronPython" + "${CMake_BINARY_DIR}/Tests/FindPython/Implementation.IronPython2" ${build_generator_args} --build-project TestImplementationIronPython --build-options ${build_options} -DPython_REQUESTED_VERSION=2 -DPython_REQUESTED_IMPLEMENTATION=IronPython @@ -579,6 +579,29 @@ if (CMake_TEST_FindPython2 AND CMake_TEST_FindPython2_IronPython) ) endif() +if (CMake_TEST_FindPython3 AND CMake_TEST_FindPython3_IronPython) + add_test(NAME FindPython.Implementation.CPython3 COMMAND + ${CMAKE_CTEST_COMMAND} -C $ + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindPython/Implementation" + "${CMake_BINARY_DIR}/Tests/FindPython/Implementation.CPython3" + ${build_generator_args} + --build-project TestImplementationCPython + --build-options ${build_options} -DPython_REQUESTED_VERSION=3 -DPython_REQUESTED_IMPLEMENTATIONS=CPython + --test-command ${CMAKE_CTEST_COMMAND} -V -C $ + ) + add_test(NAME FindPython.Implementation.IronPython3 COMMAND + ${CMAKE_CTEST_COMMAND} -C $ + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindPython/Implementation" + "${CMake_BINARY_DIR}/Tests/FindPython/Implementation.IronPython3" + ${build_generator_args} + --build-project TestImplementationIronPython + --build-options ${build_options} -DPython_REQUESTED_VERSION=3 -DPython_REQUESTED_IMPLEMENTATION=IronPython + --test-command ${CMAKE_CTEST_COMMAND} -V -C $ + ) +endif() + if(CMake_TEST_FindPython2_IronPython) add_test(NAME FindPython.IronPython2.LOCATION COMMAND ${CMAKE_CTEST_COMMAND} -C $ @@ -601,26 +624,6 @@ if(CMake_TEST_FindPython2_IronPython) --test-command ${CMAKE_CTEST_COMMAND} -V -C $ ) - add_test(NAME FindPython.IronPython.LOCATION COMMAND - ${CMAKE_CTEST_COMMAND} -C $ - --build-and-test - "${CMake_SOURCE_DIR}/Tests/FindPython/IronPython" - "${CMake_BINARY_DIR}/Tests/FindPython/IronPython.LOCATION" - ${build_generator_args} - --build-project TestIronPython - --build-options ${build_options} -DPython_FIND_STRATEGY=LOCATION - --test-command ${CMAKE_CTEST_COMMAND} -V -C $ - ) - add_test(NAME FindPython.IronPython.VERSION COMMAND - ${CMAKE_CTEST_COMMAND} -C $ - --build-and-test - "${CMake_SOURCE_DIR}/Tests/FindPython/IronPython" - "${CMake_BINARY_DIR}/Tests/FindPython/IronPython.VERSION" - ${build_generator_args} - --build-project TestIronPython - --build-options ${build_options} -DPython_FIND_STRATEGY=VERSION - --test-command ${CMAKE_CTEST_COMMAND} -V -C $ - ) add_test(NAME FindPython.IronPython.V2.LOCATION COMMAND ${CMAKE_CTEST_COMMAND} -C $ --build-and-test @@ -666,6 +669,96 @@ if(CMake_TEST_FindPython2_IronPython) ) endif() +if(CMake_TEST_FindPython3_IronPython) + add_test(NAME FindPython.IronPython3.LOCATION COMMAND + ${CMAKE_CTEST_COMMAND} -C $ + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindPython/IronPython3" + "${CMake_BINARY_DIR}/Tests/FindPython/IronPython3.LOCATION" + ${build_generator_args} + --build-project TestIronPython3 + --build-options ${build_options} -DPython3_FIND_STRATEGY=LOCATION + --test-command ${CMAKE_CTEST_COMMAND} -V -C $ + ) + add_test(NAME FindPython.IronPython3.VERSION COMMAND + ${CMAKE_CTEST_COMMAND} -C $ + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindPython/IronPython3" + "${CMake_BINARY_DIR}/Tests/FindPython/IronPython3.VERSION" + ${build_generator_args} + --build-project TestIronPython3 + --build-options ${build_options} -DPython3_FIND_STRATEGY=VERSION + --test-command ${CMAKE_CTEST_COMMAND} -V -C $ + ) + + add_test(NAME FindPython.IronPython.V3.LOCATION COMMAND + ${CMAKE_CTEST_COMMAND} -C $ + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindPython/IronPython" + "${CMake_BINARY_DIR}/Tests/FindPython/IronPython.V3.LOCATION" + ${build_generator_args} + --build-project TestIronPython + --build-options ${build_options} -DPython_REQUESTED_VERSION=3 -DPython_FIND_STRATEGY=LOCATION + --test-command ${CMAKE_CTEST_COMMAND} -V -C $ + ) + add_test(NAME FindPython.IronPython.V3.VERSION COMMAND + ${CMAKE_CTEST_COMMAND} -C $ + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindPython/IronPython" + "${CMake_BINARY_DIR}/Tests/FindPython/IronPython.V3.VERSION" + ${build_generator_args} + --build-project TestIronPython + --build-options ${build_options} -DPython_REQUESTED_VERSION=3 -DPython_FIND_STRATEGY=VERSION + --test-command ${CMAKE_CTEST_COMMAND} -V -C $ + ) + + add_test(NAME FindPython.IronPython3.VersionRange.LOCATION COMMAND + ${CMAKE_CTEST_COMMAND} -C $ + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindPython/VersionRange" + "${CMake_BINARY_DIR}/Tests/FindPython/IronPython3.VersionRange.LOCATION" + ${build_generator_args} + --build-project TestVersionRange + --build-options ${build_options} -DPython=Python3 -DPython_REQUESTED_VERSION=3 + -DPython3_FIND_IMPLEMENTATIONS=IronPython + -DPython3_FIND_STRATEGY=LOCATION + ) + add_test(NAME FindPython.IronPython3.VersionRange.VERSION COMMAND + ${CMAKE_CTEST_COMMAND} -C $ + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindPython/VersionRange" + "${CMake_BINARY_DIR}/Tests/FindPython/IronPython3.VersionRange.VERSION" + ${build_generator_args} + --build-project TestVersionRange + --build-options ${build_options} -DPython=Python3 -DPython_REQUESTED_VERSION=3 + -DPython3_FIND_IMPLEMENTATIONS=IronPython + -DPython3_FIND_STRATEGY=VERSION + ) +endif() + +if(CMake_TEST_FindPython2_IronPython OR CMake_TEST_FindPython3_IronPython) + add_test(NAME FindPython.IronPython.LOCATION COMMAND + ${CMAKE_CTEST_COMMAND} -C $ + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindPython/IronPython" + "${CMake_BINARY_DIR}/Tests/FindPython/IronPython.LOCATION" + ${build_generator_args} + --build-project TestIronPython + --build-options ${build_options} -DPython_FIND_STRATEGY=LOCATION + --test-command ${CMAKE_CTEST_COMMAND} -V -C $ + ) + add_test(NAME FindPython.IronPython.VERSION COMMAND + ${CMAKE_CTEST_COMMAND} -C $ + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindPython/IronPython" + "${CMake_BINARY_DIR}/Tests/FindPython/IronPython.VERSION" + ${build_generator_args} + --build-project TestIronPython + --build-options ${build_options} -DPython_FIND_STRATEGY=VERSION + --test-command ${CMAKE_CTEST_COMMAND} -V -C $ + ) +endif() + if(CMake_TEST_FindPython2_PyPy) add_test(NAME FindPython.PyPy2.LOCATION COMMAND ${CMAKE_CTEST_COMMAND} -C $ diff --git a/Tests/FindPython/IronPython3/CMakeLists.txt b/Tests/FindPython/IronPython3/CMakeLists.txt new file mode 100644 index 0000000..b09097a --- /dev/null +++ b/Tests/FindPython/IronPython3/CMakeLists.txt @@ -0,0 +1,31 @@ +cmake_minimum_required(VERSION 3.5) + +project(TestIronPython3 LANGUAGES NONE) + +set (Python3_FIND_IMPLEMENTATIONS "IronPython") + +find_package(Python3 COMPONENTS Interpreter Compiler) +if (NOT Python3_FOUND) + message (FATAL_ERROR "Failed to find Python 3") +endif() + +if (NOT Python3_Interpreter_FOUND) + message (FATAL_ERROR "Failed to find Python 3 Interpreter") +endif() +if (NOT Python3_INTERPRETER_ID STREQUAL "IronPython") + message (FATAL_ERROR "Erroneous interpreter ID (${Python3_INTERPRETER_ID})") +endif() + +if (NOT Python3_Compiler_FOUND) + message (FATAL_ERROR "Failed to find Python 3 Compiler") +endif() +if (NOT Python3_COMPILER_ID STREQUAL "IronPython") + message (FATAL_ERROR "Erroneous compiler ID (${Python3_COMPILER_ID})") +endif() + +if(NOT TARGET Python3::Interpreter) + message(SEND_ERROR "Python3::Interpreter not found") +endif() +if(NOT TARGET Python3::Compiler) + message(SEND_ERROR "Python3::Compiler not found") +endif() -- cgit v0.12 From 97b3a2ac17b0c28b27ff0a238b3466f610483d02 Mon Sep 17 00:00:00 2001 From: Marc Chevrier Date: Thu, 29 Jun 2023 16:12:16 +0200 Subject: FindPython: Add labels Python2 and/or Python3 on tests --- Tests/FindPython/CMakeLists.txt | 68 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 66 insertions(+), 2 deletions(-) diff --git a/Tests/FindPython/CMakeLists.txt b/Tests/FindPython/CMakeLists.txt index bb9bef0..636a7b0 100644 --- a/Tests/FindPython/CMakeLists.txt +++ b/Tests/FindPython/CMakeLists.txt @@ -164,6 +164,16 @@ if(CMake_TEST_FindPython2) --build-options ${build_options} --test-command ${CMAKE_CTEST_COMMAND} -V -C $ ) + + set_property(TEST FindPython.Python2.LOCATION FindPython.Python2.VERSION + FindPython.Python2.Development.Module FindPython.Python2Fail + FindPython.Python.V2.LOCATION FindPython.Python.V2.VERSION + FindPython.Python2.ExactVersion.LOCATION FindPython.Python2.ExactVersion.VERSION + FindPython.Python.V2.ExactVersion.LOCATION FindPython.Python.V2.ExactVersion.VERSION + FindPython.Python2.VersionRange.LOCATION FindPython.Python2.VersionRange.VERSION + FindPython.Python.V2.VersionRange.LOCATION FindPython.Python.V2.VersionRange.VERSION + FindPython.Python2Embedded + APPEND PROPERTY LABELS Python2) endif() if(CMake_TEST_FindPython3) @@ -413,6 +423,18 @@ if(CMake_TEST_FindPython3) --test-command ${CMAKE_CTEST_COMMAND} -V -C $ ) + set_property(TEST FindPython.Python3.LOCATION FindPython.Python3.VERSION + FindPython.Python3.Development.Module FindPython.Python3Fail + FindPython.Python.V3.LOCATION FindPython.Python.V3.VERSION + FindPython.Python3.ExactVersion.LOCATION FindPython.Python3.ExactVersion.VERSION + FindPython.Python.V3.ExactVersion.LOCATION FindPython.Python.V3.ExactVersion.VERSION + FindPython.Python3.VersionRange.LOCATION FindPython.Python3.VersionRange.VERSION + FindPython.Python.V3.VersionRange.LOCATION FindPython.Python.V3.VersionRange.VERSION + FindPython.VirtualEnv FindPython.Python3Embedded FindPython.RequiredArtifacts + FindPython.ArtifactsInteractive.ON FindPython.ArtifactsInteractive.OFF + FindPython.CustomFailureMessage FindPython.DifferentComponents + APPEND PROPERTY LABELS Python3) + if (CMAKE_SYSTEM_NAME STREQUAL "Linux") add_test(NAME FindPython.UnversionedNames COMMAND ${CMAKE_CTEST_COMMAND} -C $ @@ -423,6 +445,7 @@ if(CMake_TEST_FindPython3) --build-project UnversionedNames --build-options ${build_options} ) + set_property(TEST FindPython.UnversionedNames APPEND PROPERTY LABELS Python3) endif() endif() @@ -475,6 +498,9 @@ if(CMake_TEST_FindPython2 OR CMake_TEST_FindPython3) "-DCMake_TEST_FindPython_COMPONENT=Development" --test-command ${CMAKE_CTEST_COMMAND} -V -C $ ) + + set_property(TEST FindPython.Interpreter.SOABI FindPython.Development.SOABI + APPEND PROPERTY LABELS Python2 Python3) endif() add_test(NAME FindPython.MultiplePackages COMMAND @@ -487,6 +513,9 @@ if(CMake_TEST_FindPython2 OR CMake_TEST_FindPython3) --build-options ${build_options} --test-command ${CMAKE_CTEST_COMMAND} -V -C $ ) + + set_property(TEST FindPython.Python.LOCATION FindPython.Python.VERSION FindPython.MultiplePackages + APPEND PROPERTY LABELS Python2 Python3) endif() @@ -501,8 +530,9 @@ if(CMake_TEST_FindPython2_SABIModule) --build-options ${build_options} --test-command ${CMAKE_CTEST_COMMAND} -V -C $ ) - set_tests_properties(FindPython.Python2.Development.SABIModule PROPERTIES - PASS_REGULAR_EXPRESSION "Could NOT find Python2 \\(missing: .*Development\\.SABIModule") + set_tests_properties(FindPython.Python2.Development.SABIModule PROPERTIES + PASS_REGULAR_EXPRESSION "Could NOT find Python2 \\(missing: .*Development\\.SABIModule") + set_property(TEST FindPython.Python2.Development.SABIModule APPEND PROPERTY LABELS Python2) endif() if(CMake_TEST_FindPython3_SABIModule) @@ -519,6 +549,7 @@ if(CMake_TEST_FindPython3_SABIModule) --build-options ${build_options} --test-command ${CMAKE_CTEST_COMMAND} -V -C Release ) + set_property(TEST FindPython.Python3.Development.SABIModule APPEND PROPERTY LABELS Python3) endif() if(CMake_TEST_FindPython2_NumPy OR CMake_TEST_FindPython3_NumPy) @@ -541,6 +572,8 @@ if(CMake_TEST_FindPython2_NumPy OR CMake_TEST_FindPython3_NumPy) --build-project TestNumPyOnly --build-options ${build_options} ) + + set_property(TEST FindPython.NumPy FindPython.NumPyOnly APPEND PROPERTY LABELS Python2 Python3) endif() if(CMake_TEST_FindPython3_Conda) @@ -554,6 +587,7 @@ if(CMake_TEST_FindPython3_Conda) --build-options ${build_options} --test-command ${CMAKE_CTEST_COMMAND} -V -C $ ) + set_property(TEST FindPython.VirtualEnvConda APPEND PROPERTY LABELS Python3) endif() if (CMake_TEST_FindPython2 AND CMake_TEST_FindPython2_IronPython) @@ -577,6 +611,9 @@ if (CMake_TEST_FindPython2 AND CMake_TEST_FindPython2_IronPython) --build-options ${build_options} -DPython_REQUESTED_VERSION=2 -DPython_REQUESTED_IMPLEMENTATION=IronPython --test-command ${CMAKE_CTEST_COMMAND} -V -C $ ) + + set_property(TEST FindPython.Implementation.CPython2 FindPython.Implementation.IronPython2 + APPEND PROPERTY LABELS Python2) endif() if (CMake_TEST_FindPython3 AND CMake_TEST_FindPython3_IronPython) @@ -600,6 +637,9 @@ if (CMake_TEST_FindPython3 AND CMake_TEST_FindPython3_IronPython) --build-options ${build_options} -DPython_REQUESTED_VERSION=3 -DPython_REQUESTED_IMPLEMENTATION=IronPython --test-command ${CMAKE_CTEST_COMMAND} -V -C $ ) + + set_property(TEST FindPython.Implementation.CPython3 FindPython.Implementation.IronPython3 + APPEND PROPERTY LABELS Python3) endif() if(CMake_TEST_FindPython2_IronPython) @@ -667,6 +707,11 @@ if(CMake_TEST_FindPython2_IronPython) -DPython2_FIND_IMPLEMENTATIONS=IronPython -DPython2_FIND_STRATEGY=VERSION ) + + set_property(TEST FindPython.IronPython2.LOCATION FindPython.IronPython2.VERSION + FindPython.IronPython.V2.LOCATION FindPython.IronPython.V2.VERSION + FindPython.IronPython2.VersionRange.LOCATION FindPython.IronPython2.VersionRange.VERSION + APPEND PROPERTY LABELS Python2) endif() if(CMake_TEST_FindPython3_IronPython) @@ -734,6 +779,11 @@ if(CMake_TEST_FindPython3_IronPython) -DPython3_FIND_IMPLEMENTATIONS=IronPython -DPython3_FIND_STRATEGY=VERSION ) + + set_property(TEST FindPython.IronPython3.LOCATION FindPython.IronPython3.VERSION + FindPython.IronPython.V3.LOCATION FindPython.IronPython.V3.VERSION + FindPython.IronPython3.VersionRange.LOCATION FindPython.IronPython3.VersionRange.VERSION + APPEND PROPERTY LABELS Python3) endif() if(CMake_TEST_FindPython2_IronPython OR CMake_TEST_FindPython3_IronPython) @@ -757,6 +807,9 @@ if(CMake_TEST_FindPython2_IronPython OR CMake_TEST_FindPython3_IronPython) --build-options ${build_options} -DPython_FIND_STRATEGY=VERSION --test-command ${CMAKE_CTEST_COMMAND} -V -C $ ) + + set_property(TEST FindPython.IronPython.LOCATION FindPython.IronPython.VERSION + APPEND PROPERTY LABELS Python2 Python3) endif() if(CMake_TEST_FindPython2_PyPy) @@ -801,6 +854,10 @@ if(CMake_TEST_FindPython2_PyPy) --build-options ${build_options} -DPython_REQUESTED_VERSION=2 -DPython_FIND_STRATEGY=VERSION --test-command ${CMAKE_CTEST_COMMAND} -V -C $ ) + + set_property(TEST FindPython.PyPy2.LOCATION FindPython.PyPy2.VERSION + FindPython.PyPy.V2.LOCATION FindPython.PyPy.V2.VERSION + APPEND PROPERTY LABELS Python2) endif() if(CMake_TEST_FindPython3_PyPy) @@ -845,6 +902,10 @@ if(CMake_TEST_FindPython3_PyPy) --build-options ${build_options} -DPython_REQUESTED_VERSION=3 -DPython_FIND_STRATEGY=VERSION --test-command ${CMAKE_CTEST_COMMAND} -V -C $ ) + + set_property(TEST FindPython.PyPy3.LOCATION FindPython.PyPy3.VERSION + FindPython.PyPy.V3.LOCATION FindPython.PyPy.V3.VERSION + APPEND PROPERTY LABELS Python3) endif() if(CMake_TEST_FindPython2_PyPy OR CMake_TEST_FindPython3_PyPy) @@ -868,4 +929,7 @@ if(CMake_TEST_FindPython2_PyPy OR CMake_TEST_FindPython3_PyPy) --build-options ${build_options} -DPython_FIND_STRATEGY=VERSION --test-command ${CMAKE_CTEST_COMMAND} -V -C $ ) + + set_property(TEST FindPython.PyPy.LOCATION FindPython.PyPy.VERSION + APPEND PROPERTY LABELS Python2 Python3) endif() -- cgit v0.12