visual studio - msbuild set path to CL -
i'm trying take couple of projects compiled on windows microsoft c++ , compile them clang instead.
on upside, there exists clang-cl.exe designed drop-in replacement cl.exe. however, when copy clang-cl.exe current directory cl.exe, msbuild still in cases calls microsoft's cl.exe.
is there way tell msbuild 'here, when executing task cl, use cl.exe instead of usual one'? msbuild's commandline options don't contain obvious in direction.
also, there way tell supply or override commandline parameters cl without changing project file?
this easy either command line or project file. properties need configure $(cltoolexe)
, $(cltoolpath)
.
from command line:
msbuild myproj.vcxproj /p:cltoolexe=clang-cl.exe /p:cltoolpath=c:\whatever\path\to\the\tool
alternatively, inside .vcxproj file:
<propertygroup> <cltoolexe>clang-cl.exe</cltoolexe> <cltoolpath>c:\whatever\path\to\the\tool</cltoolpath> </propertygroup>
if calling task cl directly inside .vcxproj file, opposed relying on common targets, set corresponding parameters toolexe
, toolpath
of cl task.
Comments
Post a Comment