[Beignet] [PATCH] build: fix cmake code generation dependencies.

Ismo Puustinen ismo.puustinen at intel.com
Tue May 23 08:27:23 UTC 2017


There is a race condition between building .bc and header files and
generating code from .cl targets. Fix the race by adding the
dependency to generated files.

Signed-off-by: Ismo Puustinen <ismo.puustinen at intel.com>
---
 src/CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 77a1c87..f87a637 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -18,13 +18,13 @@ foreach (KF ${KERNEL_FILES})
       OUTPUT ${output_file}
       COMMAND rm -rf ${output_file}
       COMMAND ${GBE_BIN_GENERATER} -s -o${output_file} -t${GEN_PCI_ID} ${input_file}
-      DEPENDS ${input_file} ${GBE_BIN_FILE})
+      DEPENDS ${input_file} ${GBE_BIN_FILE} beignet_bitcode)
   else(GEN_PCI_ID)
     add_custom_command(
       OUTPUT ${output_file}
       COMMAND rm -rf ${output_file}
       COMMAND ${GBE_BIN_GENERATER} -s -o${output_file} ${input_file}
-      DEPENDS ${input_file} ${GBE_BIN_FILE})
+      DEPENDS ${input_file} ${GBE_BIN_FILE} beignet_bitcode)
   endif(GEN_PCI_ID)
 endforeach (KF)
 endmacro (MakeKernelBinStr)
-- 
2.9.4



More information about the Beignet mailing list