|
17 | 17 | # under the License. |
18 | 18 | # |
19 | 19 |
|
20 | | -include_directories(${PYTHON_INCLUDE_DIRS}) |
| 20 | +include_directories(${Python3_INCLUDE_DIRS}) |
21 | 21 |
|
22 | 22 | add_custom_target(python_build ALL |
23 | 23 | COMMAND ${THRIFT_COMPILER} --gen py test/test_thrift_file/TestServer.thrift |
24 | | - COMMAND ${PYTHON_EXECUTABLE} setup.py build |
| 24 | + COMMAND Python3::Interpreter setup.py build |
25 | 25 | WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} |
26 | 26 | COMMENT "Building Python library" |
27 | 27 | ) |
28 | 28 |
|
29 | 29 | if(BUILD_TESTING) |
30 | | - add_test(PythonTestSSLSocket ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/test_sslsocket.py) |
31 | | - add_test(PythonThriftJson ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/thrift_json.py) |
32 | | - add_test(PythonThriftTransport ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/thrift_transport.py) |
33 | | - add_test(PythonThriftTBinaryProtocol ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/thrift_TBinaryProtocol.py) |
34 | | - add_test(PythonThriftTZlibTransport ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/thrift_TZlibTransport.py) |
35 | | - add_test(PythonThriftProtocol ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/thrift_TCompactProtocol.py) |
36 | | - add_test(PythonThriftTNonblockingServer ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/thrift_TNonblockingServer.py) |
| 30 | + add_test(NAME PythonTestSSLSocket COMMAND Python3::Interpreter ${CMAKE_CURRENT_SOURCE_DIR}/test/test_sslsocket.py) |
| 31 | + add_test(NAME PythonThriftJson COMMAND Python3::Interpreter ${CMAKE_CURRENT_SOURCE_DIR}/test/thrift_json.py) |
| 32 | + add_test(NAME PythonThriftTransport COMMAND Python3::Interpreter ${CMAKE_CURRENT_SOURCE_DIR}/test/thrift_transport.py) |
| 33 | + add_test(NAME PythonThriftTBinaryProtocol COMMAND Python3::Interpreter ${CMAKE_CURRENT_SOURCE_DIR}/test/thrift_TBinaryProtocol.py) |
| 34 | + add_test(NAME PythonThriftTZlibTransport COMMAND Python3::Interpreter ${CMAKE_CURRENT_SOURCE_DIR}/test/thrift_TZlibTransport.py) |
| 35 | + add_test(NAME PythonThriftProtocol COMMAND Python3::Interpreter ${CMAKE_CURRENT_SOURCE_DIR}/test/thrift_TCompactProtocol.py) |
| 36 | + add_test(NAME PythonThriftTNonblockingServer COMMAND Python3::Interpreter ${CMAKE_CURRENT_SOURCE_DIR}/test/thrift_TNonblockingServer.py) |
37 | 37 | endif() |
0 commit comments