<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><pre>Thanks Magnus, is there a reliable way to get the path to vcvarsall.bat that will work for various versions of Visual Studio (express or not)?<br><br>Dan<o:p></o:p></pre><pre><o:p> </o:p></pre><pre><o:p> </o:p></pre><pre><o:p> </o:p></pre><pre>On Fri, Nov 22, 2013 at 08:49:07PM -0700, Macumber, Daniel wrote:<o:p></o:p></pre><pre>><i> Our project is using ExternalProject_Add to build Ruby. Our<o:p></o:p></i></pre><pre>><i> BUILD_COMMAND on Windows is "cd<o:p></o:p></i></pre><pre>><i> ${CMAKE_BINARY_DIR}/Ruby-prefix/src/Ruby-build && nmake". This<o:p></o:p></i></pre><pre>><i> works using the professional versions of Visual Studio. However,<o:p></o:p></i></pre><pre>><i> using Visual Studio Express 2010 I get an error that nmake is not a<o:p></o:p></i></pre><pre>><i> known program. Nmake is not in my system path but is found when<o:p></o:p></i></pre><pre>><i> running the Visual Studio command prompt. How can I get the<o:p></o:p></i></pre><pre>><i> ExternalProject build command to use the correct environment?<o:p></o:p></i></pre><pre>><i> Should I put a call to vcvarsall.bat in the command line? Is there<o:p></o:p></i></pre><pre>><i> a CMake variable that has the path to that?<o:p></o:p></i></pre><pre><o:p> </o:p></pre><pre>I would expect that you need to put the folder where nmake.exe lives<o:p></o:p></pre><pre>in the %PATH%, the easiest way of achieving that is probably to use<o:p></o:p></pre><pre>vcvarsall.bat.<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>/M<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>-- <o:p></o:p></pre><pre>Magnus Therning OpenPGP: 0xAB4DFBA4 <o:p></o:p></pre><pre>email: <a href="http://www.cmake.org/mailman/listinfo/cmake">magnus at therning.org</a> jabber: <a href="http://www.cmake.org/mailman/listinfo/cmake">magnus at therning.org</a><o:p></o:p></pre><pre>twitter: magthe <a href="http://therning.org/magnus">http://therning.org/magnus</a><o:p></o:p></pre><pre><o:p> </o:p></pre><pre>You do not examine legislation in the light of the benefits it will<o:p></o:p></pre><pre>convey if properly administered, but in the light of the wrongs it<o:p></o:p></pre><pre>would do and the harms it would cause if improperly administered.<o:p></o:p></pre><pre> -- Lyndon Johnson<o:p></o:p></pre><p class=MsoNormal><o:p> </o:p></p></div></body></html>