From b2b0cfe12115e1ae039c8acf6d6850f32dc56754 Mon Sep 17 00:00:00 2001 From: Philippe Coval Date: Fri, 24 Jul 2020 13:03:51 +0200 Subject: [PATCH] cmake: Allow one to select python3 from env This will be useful for next debian release shipping python3 Change-Id: Ie3a9e8ea9152247efa85a4e87bd121016a466795 Bug: https://github.com/jerryscript-project/iotjs/issues/1945 Bug-Debian: https://bugs.debian.org/936738 Forwarded: https://github.com/jerryscript-project/iotjs/pull/1946 Origin: https://github.com/TizenTeam/iotjs/tree/sandbox/rzr/python/review/master IoT.js-DCO-1.0-Signed-off-by: Philippe Coval rzr@users.sf.net Change-Id: Ic0db03346959f2760439aac84a0cbc166fc54d0d --- cmake/iotjs.cmake | 6 +++++- deps/jerry | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cmake/iotjs.cmake b/cmake/iotjs.cmake index cdd3d2f918..39e13eb59f 100644 --- a/cmake/iotjs.cmake +++ b/cmake/iotjs.cmake @@ -14,6 +14,10 @@ cmake_minimum_required(VERSION 2.8) +if(NOT DEFINED PYTHON) + set(PYTHON "python") +endif() + include(${CMAKE_CURRENT_LIST_DIR}/JSONParser.cmake) set(IOTJS_SOURCE_DIR ${CMAKE_SOURCE_DIR}/src) @@ -378,7 +382,7 @@ add_custom_command( COMMAND ${CMAKE_C_COMPILER} ${JS2C_PREPROCESS_ARGS} ${IOTJS_MODULE_DEFINES} ${IOTJS_SOURCE_DIR}/iotjs_magic_strings.h > ${IOTJS_SOURCE_DIR}/iotjs_magic_strings.in - COMMAND python ${ROOT_DIR}/tools/js2c.py + COMMAND ${PYTHON} ${ROOT_DIR}/tools/js2c.py ARGS --buildtype=${JS2C_RUN_MODE} --modules "${IOTJS_JS_MODULES_STR}" ${JS2C_SNAPSHOT_ARG} diff --git a/deps/jerry b/deps/jerry index 4bdc3a1c46..5fdeb7c1d6 160000 --- a/deps/jerry +++ b/deps/jerry @@ -1 +1 @@ -Subproject commit 4bdc3a1c4618e48a4346de0d534e9030a9b2a5ea +Subproject commit 5fdeb7c1d68e8c5209e186e1760bc703a723d588