MPC icon indicating copy to clipboard operation
MPC copied to clipboard

How to use remove_from using a template variable

Open jwillemsen opened this issue 6 years ago • 2 comments

I can't find a working way that uses the remove_from support to iterate through template_files and remove any found template file from the header files like below, it seems that template_file is always seen as regex but I want to match with the content of template_file. A possible solution for #50

<%foreach(uniq(template_files))%>
    <ClCompile Include="<%template_file%>">
        <%if(remove_from(header_files, template_file, header_file))%>
  removed <%header_file%>
<%endif%>

jwillemsen avatar Jun 22 '18 08:06 jwillemsen

Is there another foreach around this?

mitza-oci avatar Jun 22 '18 15:06 mitza-oci

No, it there is not, code above was one of the things I tried (I tried several combinations), this is from https://github.com/DOCGroup/MPC/blob/2f34d65acdf6c1a1e19a94a5df96314fd7a72bb9/templates/vc10.mpd#L787

jwillemsen avatar Jun 23 '18 09:06 jwillemsen