Debian Codegraph @

src/python/PyImathNumpyTest/CMakeLists.txt

raw
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright Contributors to the OpenEXR Project.
3
4 if(TARGET Python2::Interpreter)
5 add_test(PyImath.PyImathNumpyTest_Python2
6 ${Python2_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/pyImathNumpyTest.in
7 )
8 set_tests_properties(PyImath.PyImathNumpyTest_Python2 PROPERTIES
9 ENVIRONMENT "PYTHONPATH=${CMAKE_BINARY_DIR}/python${Python2_VERSION_MAJOR}_${Python2_VERSION_MINOR}"
10 )
11 endif()
12
13 if(TARGET Python3::Interpreter)
14 add_test(PyImath.PyImathNumpyTest_Python3
15 ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/pyImathNumpyTest.in
16 )
17 set_tests_properties(PyImath.PyImathNumpyTest_Python3 PROPERTIES
18 ENVIRONMENT "PYTHONPATH=${CMAKE_BINARY_DIR}/python${Python3_VERSION_MAJOR}_${Python3_VERSION_MINOR}"
19 )
20 endif()