From d387405a3c1e7bfe8d80dffe109d18b4a1b2041c Mon Sep 17 00:00:00 2001 From: Kristofer Jonsson Date: Thu, 25 Nov 2021 13:07:27 +0100 Subject: Use CMake to find Python 3 interpreter The name of the Python 3 interpreter is ambiguous. 'python3' is not available on all systems and 'python' can be both a Python 2 and Python 3 interpreter. Change-Id: I4ea119c617d1746fd34ecdd118a7c25dfe17dc86 --- targets/corstone-300/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'targets') diff --git a/targets/corstone-300/CMakeLists.txt b/targets/corstone-300/CMakeLists.txt index 9d5ce26..d2e3322 100644 --- a/targets/corstone-300/CMakeLists.txt +++ b/targets/corstone-300/CMakeLists.txt @@ -26,7 +26,10 @@ if (NOT CMAKE_TOOLCHAIN_FILE) set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/toolchain/armclang.cmake") endif() -set(ETHOSU_COMMAND_DEFAULT python3 ${CMAKE_CURRENT_SOURCE_DIR}/../../scripts/run_ctest.py -t corstone-300 CACHE INTERNAL "Default test command") +set(Python3_FIND_STRATEGY LOCATION) +find_package(Python3 COMPONENTS Interpreter) + +set(ETHOSU_COMMAND_DEFAULT ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/../../scripts/run_ctest.py -t corstone-300 CACHE INTERNAL "Default test command") ############################################################################# # Project -- cgit v1.2.1