[Beignet] [PATCH] Use ${PYTHON_EXECUTABLE} to run python scripts.

Yichao Yu yyc1992 at gmail.com
Tue Sep 9 17:31:21 PDT 2014


Signed-off-by: Yichao Yu <yyc1992 at gmail.com>
---
 backend/src/libocl/CMakeLists.txt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/backend/src/libocl/CMakeLists.txt b/backend/src/libocl/CMakeLists.txt
index fb93da1..d71f70b 100644
--- a/backend/src/libocl/CMakeLists.txt
+++ b/backend/src/libocl/CMakeLists.txt
@@ -67,9 +67,9 @@ MACRO(GENERATE_HEADER_PY _mod)
     ADD_CUSTOM_COMMAND(OUTPUT ${output_name}
 	COMMAND mkdir -p ${LIBOCL_BINARY_DIR}/include/
 	#COMMAND echo "cat ${tmpl_name} \\> ${output_name}"
-	COMMAND cat ${tmpl_name} > ${output_name} 
+	COMMAND cat ${tmpl_name} > ${output_name}
 	#COMMAND echo "${LIBOCL_SOURCE_DIR}/script/gen_vector.py ${def_name} ${output_name} 1"
-	COMMAND ${LIBOCL_SOURCE_DIR}/script/gen_vector.py ${def_name} ${output_name} 1
+	COMMAND ${PYTHON_EXECUTABLE} ${LIBOCL_SOURCE_DIR}/script/gen_vector.py ${def_name} ${output_name} 1
 	#COMMAND echo "echo \\#endif \\>\\> ${output_name}"
 	COMMAND echo "\\#endif" >> ${output_name}
 	DEPENDS ${tmpl_name}
@@ -83,8 +83,8 @@ MACRO(GENERATE_SOURCE_PY _mod)
     SET(OCL_SOURCE_FILES ${OCL_SOURCE_FILES} ${output_name})
     ADD_CUSTOM_COMMAND(OUTPUT ${output_name}
 	COMMAND mkdir -p ${LIBOCL_BINARY_DIR}/src/
-	COMMAND cat ${tmpl_name} > ${output_name} 
-	COMMAND ${LIBOCL_SOURCE_DIR}/script/gen_vector.py ${def_name} ${output_name} 0
+	COMMAND cat ${tmpl_name} > ${output_name}
+	COMMAND ${PYTHON_EXECUTABLE} ${LIBOCL_SOURCE_DIR}/script/gen_vector.py ${def_name} ${output_name} 0
 	DEPENDS ${tmpl_name}
 	COMMENT "Generate the source by python: ${output_name}"
 	)
-- 
2.1.0



More information about the Beignet mailing list