[Beignet] [PATCH] utests: define python interpreter via cmake variable
Boqun Feng
boqun.feng at gmail.com
Sat Feb 15 07:52:44 CET 2014
The reason for this fix is in commit
5b64170ef5e3e78d038186fb1132b11a8fec308e.
Signed-off-by: Boqun Feng <boqun.feng 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}
)
--
1.8.5.4
More information about the Beignet
mailing list