<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&#39;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 &#39;FindVSEnvironment.cmake&#39;.  While I can&#39;t test it for a large number of MSVC versions, I&#39;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">&lt;<a href="mailto:drescherjm@gmail.com" target="_blank">drescherjm@gmail.com</a>&gt;</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">&gt; Why not just write your own batch (&#39;buildit.bat&#39;) file that does:<br>
&gt;<br>
&gt;    call vcvarsall.bat<br>
&gt;    nmake<br>
&gt;<br>
&gt; (or whatever the command to build in the VS command prompt is...)<br>
&gt;<br>
&gt; And then your command to build is:<br>
&gt;<br>
&gt;    C:/full/path/to/buildit.bat<br>
&gt;<br>
&gt; It&#39;s presumably in a Windows-specific chunk of your CMakeLists anyway, so<br>
&gt; 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>