[Beignet] [PATCH] utests: define python interpreter via cmake variable
Igor Gnatenko
i.gnatenko.brain at gmail.com
Sun Feb 16 21:05:43 CET 2014
On Sat, 2014-02-15 at 14:52 +0800, Boqun Feng wrote:
> The reason for this fix is in commit
> 5b64170ef5e3e78d038186fb1132b11a8fec308e.
>
> Signed-off-by: Boqun Feng <boqun.feng at gmail.com>
Reviewed-by: Igor Gnatenko <i.gnatenko.brain at gmail.com>
> ---
> utests/CMakeLists.txt | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/utests/CMakeLists.txt b/utests/CMakeLists.txt
> index 0614ee6..b7d6f71 100644
> --- a/utests/CMakeLists.txt
> +++ b/utests/CMakeLists.txt
> @@ -3,7 +3,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}
>
> ##### Math Function Part:
> EXEC_PROGRAM(mkdir ${CMAKE_CURRENT_SOURCE_DIR} ARGS generated -p)
> -EXEC_PROGRAM(python ${CMAKE_CURRENT_SOURCE_DIR} ARGS utest_math_gen.py OUTPUT_VARIABLE GEN_MATH_STRING)
> +EXEC_PROGRAM(${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR} ARGS utest_math_gen.py OUTPUT_VARIABLE GEN_MATH_STRING)
> string(REGEX REPLACE " " ";" ADDMATHFUNC ${GEN_MATH_STRING})
> string(REGEX REPLACE " " "\n" NAMEMATHLIST ${GEN_MATH_STRING})
> MESSAGE(STATUS "Generated Builtin Math Functions:\n" ${NAMEMATHLIST})
> @@ -186,7 +186,7 @@ ADD_CUSTOM_TARGET(kernel_bin.bin
>
> add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/generated
> COMMAND mkdir ${CMAKE_CURRENT_SOURCE_DIR}/generated -p
> - COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/utest_math_gen.py > /dev/null 2>&1
> + COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/utest_math_gen.py > /dev/null 2>&1
> COMMAND echo ${KERNEL_GITIGNORE_LIST} |sed 's/ /\\n/g' > ${CMAKE_CURRENT_SOURCE_DIR}/../kernels/.gitignore
> WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
> )
--
-Igor Gnatenko
More information about the Beignet
mailing list