So I modified the CMakeVS10FindMake.cmake module to print the result of the first call to find_program():<div><br></div><div><div>FIND_PROGRAM(CMAKE_MAKE_PROGRAM</div><div> NAMES devenv</div><div> HINTS</div><div> [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VS;EnvironmentDirectory]</div>
<div> [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup;Dbghelp_path]</div><div> "$ENV{ProgramFiles}/Microsoft Visual Studio 10.0/Common7/IDE"</div><div> "$ENV{ProgramFiles}/Microsoft Visual Studio10.0/Common7/IDE"</div>
<div> "$ENV{ProgramFiles}/Microsoft Visual Studio 10/Common7/IDE"</div><div> "$ENV{ProgramFiles}/Microsoft Visual Studio10/Common7/IDE"</div><div> "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio 10.0/Common7/IDE"</div>
<div> "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio10.0/Common7/IDE"</div><div> "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio 10/Common7/IDE"</div><div> "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio10/Common7/IDE"</div>
<div> "/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/"</div><div> "/Program Files/Microsoft Visual Studio 10/Common7/IDE/"</div><div> )</div><div><br></div><div> message( "Make Program: ${CMAKE_MAKE_PROGRAM}" )</div>
<div><br></div><div>The message I get is:</div><div><br></div><div><span style=" color:#ff0000;">Make Program: C:/Program Files (x86)/Microsoft Visual Studio .NET 2003/Common7/IDE/<a href="http://devenv.com">devenv.com</a></span></div>
<div><span style=" color:#ff0000;"><br></span></div>I don't know how the above paths cause the VS2003 directory to be searched.</div><div><br></div><div>Here is my PATH:</div><div><br></div><div>C:\Perl\site\bin;C:\Perl\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\ThinkPad\Bluetooth Software\;C:\Program Files\ThinkPad\Bluetooth Software\syswow64;C:\SWTOOLS\ReadyApps;C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Perforce;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\CMake 2.8\bin;C:\Program Files (x86)\Perforce;C:\bjam;C:\Program Files\TortoiseSVN\bin;C:\pearlscripts;C:\patch\bin;"C:\Program Files (x86)\IBM\Lotus\Domino";C:\PROGRA~2\IBM\Lotus\Domino;C:\Program Files\TortoiseGit\bin;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\IBM\RationalPurifyPlus\Common;C:\sysinternals;C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Vc7\bin;C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Common7\IDE</div>
<div><br></div><div>I have VS2003 on my path apparently, I don't remember adding that... but should this really break the find module? I don't think it should be checking PATH, if that's what it is doing, since obviously it breaks it, and it has no way of verifying what version of devenv it is getting.<br>
<div><br></div><div>---------</div>Robert Dailey<br>
<br><br><div class="gmail_quote">On Mon, Nov 21, 2011 at 9:12 AM, Robert Dailey <span dir="ltr"><<a href="mailto:rcdailey@gmail.com">rcdailey@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I have the following versions of VS installed:<div><br></div><div>VS 2003</div><div>VS 2005</div><div>VS 2008</div><div>VC 2010 Express</div><div><br></div><div>So I can imagine there would be a lot of confusion :P</div><div>
<br></div><div>FWIW, CMake can find VS 2003 and VS2008 just fine.</div><div><br></div><div>I will look at the script and debug this a bit and then report back to you guys. Thanks for the guidance.<br clear="all"><div><br>
</div><div>---------</div><span class="HOEnZb"><font color="#888888">Robert Dailey</font></span><div><div class="h5"><br>
<br><br><div class="gmail_quote">On Mon, Nov 21, 2011 at 8:59 AM, Bill Hoffman <span dir="ltr"><<a href="mailto:bill.hoffman@kitware.com" target="_blank">bill.hoffman@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On 11/21/2011 9:23 AM, Robert Dailey wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I think though that by default, no visual studio installations place the<br>
install path in PATH in the environment. So if I'm remembering correctly<br>
and that is true, what other means does it use? Does it use the registry<br>
at all? If you could kindly describe the search path it uses that would<br>
be very helpful. The only other way for me to figure this out is to skim<br>
the source code, which would be very time consuming! Hopefully you can<br>
save me some time :)<br>
<br>
</blockquote>
<br></div>
The logic can all be found here:<br>
<br>
Modules/CMakeVS10FindMake.<u></u>cmake<br>
<br>
It is a very small file. Obviously needs a bit of work. It is finding <a href="http://devenv.com" target="_blank">devenv.com</a> on your machine when it should not. We should most likely check the version of what is found. For the IDE PATH, LIB and INCLUDE are not used or required. PATH will be used if it finds <a href="http://devenv.com" target="_blank">devenv.com</a>. In your case that is most likely what is happening.<br>
<br>
If you had a machine with only VS 10 express it would have worked fine. :)<br>
<br>
It is very hard to test things like this... :)<br>
<br>
<br>
If you can tweak the CMake code in Modules/CMakeVS10FindMake.<u></u>cmake and make it work on your machine, that would be great.<br>
<br>
Thanks.<span><font color="#888888"><br>
<br>
-Bill<br>
</font></span></blockquote></div><br></div></div></div>
</blockquote></div><br></div>