I've also always found a key ingredient in making multiple versions of
Visual Studio work well with each other is to keep them from adding
anything about themselves into system-wide or user-wide env var
values. It's both unnecessary and counterproductive.

Especially given the fact that VS itself works without any env var
values, and they all provide tailored cmd prompts that have env set up
for themselves.


HTH,
David


On Mon, Nov 21, 2011 at 1:17 PM, Michael Jackson
<mike.jack...@bluequartz.net> wrote:
> I has been my experience with multiple versions of Visual studio installed on 
> Windows to remove any trace of visual studio from the system path. Period. 
> Having any path in the system wide PATH or User Wide PATH variable will 
> inevitably lead to odd ball issues like this. Then, like I said before, 
> launch cmake from one of the dedicated visual studio command prompts. This 
> has ALWAYS worked for me. At one point I had VS 7, 8, 9 all installed with no 
> issues.
> ___________________________________________________________
> Mike Jackson                    Principal Software Engineer
> BlueQuartz Software                            Dayton, Ohio
> mike.jack...@bluequartz.net              www.bluequartz.net
>
> On Nov 21, 2011, at 11:23 AM, Robert Dailey wrote:
>
>> So I modified the CMakeVS10FindMake.cmake module to print the result of the 
>> first call to find_program():
>>
>> FIND_PROGRAM(CMAKE_MAKE_PROGRAM
>>   NAMES devenv
>>   HINTS
>>   
>> [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VS;EnvironmentDirectory]
>>   
>> [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup;Dbghelp_path]
>>   "$ENV{ProgramFiles}/Microsoft Visual Studio 10.0/Common7/IDE"
>>   "$ENV{ProgramFiles}/Microsoft Visual Studio10.0/Common7/IDE"
>>   "$ENV{ProgramFiles}/Microsoft Visual Studio 10/Common7/IDE"
>>   "$ENV{ProgramFiles}/Microsoft Visual Studio10/Common7/IDE"
>>   "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio 10.0/Common7/IDE"
>>   "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio10.0/Common7/IDE"
>>   "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio 10/Common7/IDE"
>>   "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio10/Common7/IDE"
>>   "/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/"
>>   "/Program Files/Microsoft Visual Studio 10/Common7/IDE/"
>>   )
>>
>>   message( "Make Program: ${CMAKE_MAKE_PROGRAM}" )
>>
>> The message I get is:
>>
>> Make Program: C:/Program Files (x86)/Microsoft Visual Studio .NET 
>> 2003/Common7/IDE/devenv.com
>>
>> I don't know how the above paths cause the VS2003 directory to be searched.
>>
>> Here is my PATH:
>>
>> 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\D
>  omino";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
>>
>> 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.
>>
>> ---------
>> Robert Dailey
>>
>>
>> On Mon, Nov 21, 2011 at 9:12 AM, Robert Dailey <rcdai...@gmail.com> wrote:
>> I have the following versions of VS installed:
>>
>> VS 2003
>> VS 2005
>> VS 2008
>> VC 2010 Express
>>
>> So I can imagine there would be a lot of confusion :P
>>
>> FWIW, CMake can find VS 2003 and VS2008 just fine.
>>
>> I will look at the script and debug this a bit and then report back to you 
>> guys. Thanks for the guidance.
>>
>> ---------
>> Robert Dailey
>>
>>
>>
>> On Mon, Nov 21, 2011 at 8:59 AM, Bill Hoffman <bill.hoff...@kitware.com> 
>> wrote:
>> On 11/21/2011 9:23 AM, Robert Dailey wrote:
>> I think though that by default, no visual studio installations place the
>> install path in PATH in the environment. So if I'm remembering correctly
>> and that is true, what other means does it use? Does it use the registry
>> at all? If you could kindly describe the search path it uses that would
>> be very helpful. The only other way for me to figure this out is to skim
>> the source code, which would be very time consuming! Hopefully you can
>> save me some time :)
>>
>>
>> The logic can all be found here:
>>
>> Modules/CMakeVS10FindMake.cmake
>>
>> It is a very small file.  Obviously needs a bit of work.  It is finding 
>> devenv.com 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 devenv.com.  In your case 
>> that is most likely what is happening.
>>
>> If you had a machine with only VS 10 express it would have worked fine. :)
>>
>> It is very hard to test things like this... :)
>>
>>
>> If you can tweak the CMake code in Modules/CMakeVS10FindMake.cmake and make 
>> it work on your machine, that would be great.
>>
>> Thanks.
>>
>> -Bill
>>
>>
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to