You should never allow Visual Studio or CMake installers to make changes to
your environment.

They are unnecessary and cause complications when multiple versions are
installed.

When I use cmake-gui, I double-click an icon on my desktop, or start it
from an icon in the start menu. I almost never run it from a Visual Studio
command prompt. It's unnecessary...

Visual Studio knows all about its own installation and environment, and so
there's no need to allow it to modify your machine's environment. That's
what the command prompt shortcuts are for: when you need the environment,
you can just run the command prompt with it, and use it as needed. But for
typical VS only use, it's never needed.

So: moral of the story from my point of view is: minimize environment
changes from all installers... Things should work without environment
changes, and if they don't... that's a bug.


2 cents,
David C.





On Wed, Nov 28, 2012 at 7:59 AM, Michael Jackson <
mike.jack...@bluequartz.net> wrote:

>
> On Nov 28, 2012, at 7:37 AM, David Doria <daviddo...@gmail.com> wrote:
>
> > On Wed, Nov 28, 2012 at 4:22 AM, Andrew Maclean
> > <andrew.amacl...@gmail.com> wrote:
> >> Interesting ... I have no problems, the only thing I can think of is
> that I
> >> had VS 2010 SP1 installed before I installed VS 2012 Express, I did not
> use
> >> any of the RC versions.
> >
> > Petr,
> >
> > A colleague mentioned that with the same setup he was getting the same
> > error, and then installed SP1 for VS 2010 and things started working.
> > It would really be great if there were better checks/errors because it
> > is really a huge barrier for projects like VTK to get users to fight
> > through install problems. "Hey you should use VTK for that" works when
> > they have to follow a few instructions and it works, but when they
> > have to spend days working through cryptic errors most tend to give up
> > and then we lose a user.
> >
> > Andrew,
> >
> > I'm almost certain that it will never work using the VS generators
> > (with very different "can't find the compiler type of errors") unless
> > you run cmake-gui from a terminal unless you have manually added many
> > VS things to the system environment variables. At least that has been
> > my experience on many machines.
> >
> > David
> > --
>
>
> Here is my theory on mixing visual studios. When you install Visual Studio
> Windows will dutifully add the Visual Studio tools to the PATH for
> everyone. This is why you can just launch CMakeGui and have the Visual
> Studio generators work correctly. All is well. This is where I ran into
> problems.. Now install Visual Studio 2012 (or any other version) alonside
> VS2010 and Windows will again the 2012 to the PATH also. Now you have BOTH
> VS version's tools in the path but what ever is found FIRST is the one that
> is going to be used which will cause problems when launching CMakeGUi from
> Windows Explorer. At least this is what I saw years ago and why I NEVER mix
> versions. I install each version into its own Virtual Machine and run that
> way. It avoids all of these PATH issues.
>    Unless CMake has some code to look into the registry to fully determine
> which compiler you want and setup the environment correctly by removing
> PATHS from a version of Visual Studio that you are NOT using I don't see
> how having more than a single Visual studio installed is going to work***
>
>
> *** It can work if you go into the "Environment Variables" for Windows and
> REMOVE any and all references to Visual Studio. Then when you want to
> configure a project you launch a "Visual Studio Command Prompt" or "Visual
> Studio x64 Command Prompt" and then launch CMake-gui from there which will
> properly setup the environment for you and the generator will work
> correctly every time because there is no mixing of paths. This is how I do
> it. Yes it is a few extra clicks and some typing but it avoids days of
> fighting hidden path issues.
>
> Of course I could be wrong on most of the above but it works for me for
> the last 3 years so I am not about to change. Just my nickels worth of
> advice.
> ___________________________________________________________
> Mike Jackson                    Principal Software Engineer
> BlueQuartz Software                            Dayton, Ohio
> mike.jack...@bluequartz.net              www.bluequartz.net
>
> --
>
> 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