Skip to content

Commit

Permalink
Subject: 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

Version can be specified as cmake option using:

    CMAKE_OPTIONS=-DPYTHON="python3"

Bug: jerryscript-project#1945
Bug-Debian: https://bugs.debian.org/936738
Forwarded: jerryscript-project#1946
Change-Id: Ie3a9e8ea9152247efa85a4e87bd121016a466795
Origin: https://github.com/TizenTeam/iotjs/tree/sandbox/rzr/python/review/master
Relate-to: https://travis-ci.org/github/TizenTeam/iotjs/builds/712336077
IoT.js-DCO-1.0-Signed-off-by: Philippe Coval rzr@users.sf.net
  • Loading branch information
rzr committed Jul 28, 2020
1 parent 4ec6746 commit 91a75a2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmake/iotjs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit 91a75a2

Please sign in to comment.