<div dir="ltr">Correct, this is one of the concerns that makes it more complex than just searching for the first vcvarsall.bat you come to.<div><br></div><div>I'd like to match up the vcvarsall to the version of visual studio currently in use by CMake.</div>
<div><br></div><div>I think there are now enough pieces that I can write a CMake 'FindVSEnvironment.cmake'. While I can't test it for a large number of MSVC versions, I'll post it and hopefully others can help out.</div>
<div><br></div><div>Rob</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 9, 2014 at 6:44 AM, John Drescher <span dir="ltr"><<a href="mailto:drescherjm@gmail.com" target="_blank">drescherjm@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">> Why not just write your own batch ('buildit.bat') file that does:<br>
><br>
> call vcvarsall.bat<br>
> nmake<br>
><br>
> (or whatever the command to build in the VS command prompt is...)<br>
><br>
> And then your command to build is:<br>
><br>
> C:/full/path/to/buildit.bat<br>
><br>
> It's presumably in a Windows-specific chunk of your CMakeLists anyway, so<br>
> that should work fairly simply.<br>
<br>
</div></div>I think the part of problem would be figuring out what vcvarsall.bat<br>
to run especially if you have more than 1 version of Visual Studio.<br>
<span class="HOEnZb"><font color="#888888"><br>
John<br>
</font></span></blockquote></div><br></div>