Skip to content

Commit

Permalink
cmake: Allow one to select python3 from env
Browse files Browse the repository at this point in the history
This will be useful for next debian release shipping python3

Change-Id: Ie3a9e8ea9152247efa85a4e87bd121016a466795
Bug: jerryscript-project#1945
Bug-Debian: https://bugs.debian.org/936738
Forwarded: jerryscript-project#1946
Origin: https://github.com/TizenTeam/iotjs/tree/sandbox/rzr/python/review/master
Last-Update: 2020-07-25
IoT.js-DCO-1.0-Signed-off-by: Philippe Coval [email protected]

Change-Id: I48bf135d7a3af6e64859252078931ff3388a87a6
  • Loading branch information
rzr committed Jul 25, 2020
1 parent 2b6ce9f commit 9167597
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmake/iotjs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ cmake_minimum_required(VERSION 2.8)

set(IOTJS_SOURCE_DIR ${ROOT_DIR}/src)

if(NOT DEFINED PYTHON)
set(PYTHON "python")
endif()

function(find_value RESULT VALUE VALUE_TRUE VALUE_FALSE)
list(FIND ARGN ${VALUE} idx)
if(${idx} GREATER -1)
Expand Down Expand Up @@ -53,7 +57,7 @@ if(ENABLE_MINIMAL)
endif()

execute_process(
COMMAND python ${ROOT_DIR}/tools/module_analyzer.py
COMMAND ${PYTHON} ${ROOT_DIR}/tools/module_analyzer.py
--mode cmake-dump
--target-os ${TARGET_OS}
--iotjs-include-module "${IOTJS_INCLUDE_MODULE}"
Expand Down Expand Up @@ -101,7 +105,7 @@ endif()

add_custom_command(
OUTPUT ${IOTJS_SOURCE_DIR}/iotjs_js.c ${IOTJS_SOURCE_DIR}/iotjs_js.h
COMMAND python ${ROOT_DIR}/tools/js2c.py
COMMAND ${PYTHON} ${ROOT_DIR}/tools/js2c.py
ARGS --buildtype=${JS2C_RUN_MODE}
--modules '${IOTJS_JS_MODULES}'
${JS2C_SNAPSHOT_ARG}
Expand Down

0 comments on commit 9167597

Please sign in to comment.