[Beignet] [PATCH] delete generated files after a build and clean
Zhigang Gong
zhigang.gong at linux.intel.com
Wed Feb 11 22:26:08 PST 2015
If we apply this patch, after make clean, it could not
build again by just invoking make.
The root cause is that some files are generated during
the configuation time only which is not good.
For examples: MakeBuiltInKernelStr/MakeKernelBinStr/MakeKernelBinStr.
We should make a custom target for them and let the configuration
to generate corresponding rules and generate those target
during the build time not the configuration time.
On Thu, Feb 12, 2015 at 11:01:36PM +0800, Meng Mengmeng wrote:
> Building would generate some files e.g. src/git_sha1.h, and they
> should be removed after clean.
>
> Signed-off-by: Meng Mengmeng <mengmeng.meng at intel.com>
> ---
> utests/CMakeLists.txt | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/utests/CMakeLists.txt b/utests/CMakeLists.txt
> index eaba27d..ac32282 100644
> --- a/utests/CMakeLists.txt
> +++ b/utests/CMakeLists.txt
> @@ -9,7 +9,17 @@ string(REGEX REPLACE " " ";" ADDMATHFUNC ${GEN_MATH_STRING})
> 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}")
> +
> +set(MAKE_CLEAN_FILE
> + ${CMAKE_CURRENT_SOURCE_DIR}/../CPackConfig.cmake
> + ${CMAKE_CURRENT_SOURCE_DIR}/../CPackSourceConfig.cmake
> + ${CMAKE_CURRENT_SOURCE_DIR}/../install_manifest.txt
> + ${CMAKE_CURRENT_SOURCE_DIR}/../intel-beignet.icd
> + ${CMAKE_CURRENT_SOURCE_DIR}/../src/git_sha1.h
> + ${CMAKE_CURRENT_SOURCE_DIR}/../src/kernels/cl_internal_built_in_kernel.cl
> + ${CMAKE_CURRENT_SOURCE_DIR}/../utests/setenv.sh
> +)
> +set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "generated;${KERNEL_MATH_LIST};${MAKE_CLEAN_FILE}")
>
> configure_file (
> "setenv.sh.in"
> --
> 1.9.1
>
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list