<div dir="ltr">Each Visual Studio sets a environment variable that helps you locate the installed location. So for Visual Studio 2008 it is VS90COMNTOOLS, and for Visual Studio 2010 it is<div>VS100COMNTOOLS. So you can have a single bat file that is configured by cmake to determine both the correct env variable to use, and the proper args to pass to vcvarsall.bat.<br>
<div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 9, 2014 at 9: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="im">> 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>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><div class="HOEnZb"><div class="h5">--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br></div>