[Beignet] [PATCH] utests: Put all the generated kernel files to .gitignore at runtime.
Zhigang Gong
zhigang.gong at intel.com
Mon Jan 13 19:10:00 PST 2014
As there are so many generated kernel files, it's annoying when I use
git status to check the modified files and new added files. This patch
to put all of them to the gitignore file which could make things easier.
Signed-off-by: Zhigang Gong <zhigang.gong at intel.com>
---
utests/.gitignore | 2 ++
utests/CMakeLists.txt | 2 ++
2 files changed, 4 insertions(+)
diff --git a/utests/.gitignore b/utests/.gitignore
index 9a374dc..90f80fc 100644
--- a/utests/.gitignore
+++ b/utests/.gitignore
@@ -11,3 +11,5 @@ compiler_ribbon.bmp
flat_address_space
libutests.so
utest_run
+generated
+utest_generator.pyc
diff --git a/utests/CMakeLists.txt b/utests/CMakeLists.txt
index 8c64844..07945c1 100644
--- a/utests/CMakeLists.txt
+++ b/utests/CMakeLists.txt
@@ -10,6 +10,7 @@ MESSAGE(STATUS "Generated Builtin Math Functions:\n" ${NAMEMATHLIST})
string(REGEX REPLACE "generated/([^\ ]*)\\.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/../kernels/\\1.cl" KERNEL_MATH_LIST ${GEN_MATH_STRING})
string(REGEX REPLACE " " ";" KERNEL_MATH_LIST ${KERNEL_MATH_LIST})
+string(REGEX REPLACE "generated/([^\ ]*)\\.cpp" "\\1.cl" KERNEL_GITIGNORE_LIST ${GEN_MATH_STRING})
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "generated;${KERNEL_MATH_LIST}")
configure_file (
@@ -185,6 +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 echo ${KERNEL_GITIGNORE_LIST} |sed 's/ /\\n/g' > ${CMAKE_CURRENT_SOURCE_DIR}/../kernels/.gitignore
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
add_custom_target(utest_generator
--
1.7.9.5
More information about the Beignet
mailing list