c++ - VS2015 UserMacro as Custom Build Tool -
i looking using custom build tool files of project. since command line similar of files , lazy type out entire command every time every file needs it, thought i'd create usermacro contains command line , every file needs custom build tool type $(mytool)
command line.
it works in vs calls process, macro defined using vs internal variables such %(fullpath)
, %(filename)
. unfortunately, though ui macro preview shows these variables are, appears they're being replaced once (at time visual studio parses macro?) rather every time macro used.
usermacro: sometool.exe "%(fullpath)" -outputfile "$(projectdir)generated\%(filename).cpp"
called: sometool.exe \path\to\project\generated\(filename).cpp
looks if specified get's stripped away, command line missing drive letter , colon $(projectdir)
weird reason. specifying macro content command line in file properties custom build tool working expected, that's lot of typing every file (and every new file needs build tool).
already tried specify macro %25(filename) instead of %(filename) thinking not see %(filename) on first run when build tool called , replace doesn't change anything.
is there way visual studio 2015 replace file specific ones on call, usermacro can used custom build tool command line?
Comments
Post a Comment