File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -112,13 +112,29 @@ function(compile_lib filename)
112112 "FILETYPE"
113113 "SRC;EXTRA_OPTS;DEPENDENCIES"
114114 ${ARGN} )
115+ set (compile_opt_list ${compile_opts}
116+ ${${ARG_FILETYPE} _device_compile_opts}
117+ ${ARG_EXTRA_OPTS} )
118+ compile_lib_ext(${filename}
119+ FILETYPE ${ARG_FILETYPE}
120+ SRC ${ARG_SRC}
121+ DEPENDENCIES ${ARG_DEPENDENCIES}
122+ OPTS ${compile_opt_list} )
123+ endfunction ()
124+
125+ function (compile_lib_ext filename)
126+ cmake_parse_arguments (ARG
127+ ""
128+ "FILETYPE"
129+ "SRC;OPTS;DEPENDENCIES"
130+ ${ARGN} )
115131
116132 set (devicelib-file
117133 ${${ARG_FILETYPE} _binary_dir}/${filename} .${${ARG_FILETYPE} -suffix })
118134
119135 add_custom_command (
120136 OUTPUT ${devicelib-file}
121- COMMAND ${clang} ${compile_opts} ${ARG_EXTRA_OPTS }
137+ COMMAND ${clang} ${ARG_OPTS }
122138 ${CMAKE_CURRENT_SOURCE_DIR} /${ARG_SRC} -o ${devicelib-file}
123139 MAIN_DEPENDENCY ${ARG_SRC}
124140 DEPENDS ${ARG_DEPENDENCIES}
You can’t perform that action at this time.
0 commit comments