GBE/libocl: fix build dependency issue.
authorZhigang Gong <zhigang.gong@intel.com>
Thu, 18 Sep 2014 00:33:46 +0000 (08:33 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Thu, 18 Sep 2014 04:41:17 +0000 (12:41 +0800)
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: He Junyan <junyan.he@inbox.com>
backend/src/libocl/CMakeLists.txt

index f015eec..b0074b3 100644 (file)
@@ -72,7 +72,7 @@ MACRO(GENERATE_HEADER_PY _mod)
        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}
+       DEPENDS ${tmpl_name} ${def_name} ${LIBOCL_SOURCE_DIR}/script/gen_vector.py
        COMMENT "Generate the header by python: ${output_name}"
        )
 ENDMACRO(GENERATE_HEADER_PY)
@@ -85,7 +85,7 @@ MACRO(GENERATE_SOURCE_PY _mod)
        COMMAND mkdir -p ${LIBOCL_BINARY_DIR}/src/
        COMMAND cat ${tmpl_name} > ${output_name}
        COMMAND ${PYTHON_EXECUTABLE} ${LIBOCL_SOURCE_DIR}/script/gen_vector.py ${def_name} ${output_name} 0
-       DEPENDS ${tmpl_name}
+       DEPENDS ${tmpl_name} ${def_name} ${LIBOCL_SOURCE_DIR}/script/gen_vector.py
        COMMENT "Generate the source by python: ${output_name}"
        )
 ENDMACRO(GENERATE_SOURCE_PY)