File tree Expand file tree Collapse file tree 2 files changed +516
-0
lines changed Expand file tree Collapse file tree 2 files changed +516
-0
lines changed Original file line number Diff line number Diff line change @@ -213,3 +213,24 @@ function(merge_yaml)
213213 WORKING_DIRECTORY ${EXECUTORCH_ROOT}
214214 )
215215endfunction ()
216+
217+ function (append_filelist name outputvar)
218+ set (_rootdir "${EXECUTORCH_ROOT} /" )
219+ # configure_file adds its input to the list of CMAKE_RERUN dependencies
220+ configure_file (
221+ ${PROJECT_SOURCE_DIR} /build /build_variables.bzl
222+ ${PROJECT_BINARY_DIR} /build_variables.bzl
223+ COPYONLY )
224+ execute_process (
225+ COMMAND "${Python_EXECUTABLE} " -c
226+ "exec(open('${PROJECT_SOURCE_DIR} /build/build_variables.bzl').read());print(';'.join(['${_rootdir} ' + x for x in ${name} ]))"
227+ WORKING_DIRECTORY "${_rootdir} "
228+ RESULT_VARIABLE _retval
229+ OUTPUT_VARIABLE _tempvar)
230+ if (NOT _retval EQUAL 0)
231+ message (FATAL_ERROR "Failed to fetch filelist ${name} from build_variables.bzl" )
232+ endif ()
233+ string (REPLACE "\n " "" _tempvar "${_tempvar} " )
234+ list (APPEND ${outputvar} ${_tempvar} )
235+ set (${outputvar} "${${outputvar} }" PARENT_SCOPE)
236+ endfunction ()
You can’t perform that action at this time.
0 commit comments