[CMake] looking for Visual Studio installation

Bill Hoffman bill.hoffman at kitware.com
Mon Apr 20 08:32:10 EDT 2009


Piotr Dobrogost wrote:
> Bill Hoffman wrote:
> 
>>> I am not sure I want to support something like this.  Even if CMake
>>> picked the right vsvars and setup the environment when cmake-gui was
>>> running, the user would have to know how to run vsvars.bat to run nmake
>>> at the end of the day.
> 
> Then it would be all nmake's fault and not cmake which has run without
> problems and created a build tree  :)
> 
> Now seriously. I get your point. Running simple bat file to setup
> environment _temporally_ is from one side very flexible solution
> (especially when you have more than one VS installed) but from the other
> side it just doesn't sound good to have to remember to run some funny
> bat file every time you want to use command line tools (especially when
> you have only one VS installed).
> 
> This is really MS's fault they don't provide the way of setting
> environment for VS command line tools in _persistent_ way.
> I submitted a suggestion on MS Connect. We'll see what MS has to say on
> this.
> https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=433711
> 
> If and to what extend should cmake itself repair this fault is
> questionable. That's why we're discussing this in this thread  :)
> 
>>> Maybe the answer is to create a .bat file that
>>> runs vsvars.bat and cmake-gui.exe and create a short cut to that.  You
>>> could put that on the desktop and it should work.
> 
> That would work but I'm not sure if _this_ is the answer  :)
> 
> -- Piotr Dobrogost
> *** curlpp.org - c++ wrapper for libcurl ***
> 
MS used to have this option in vs 6, and it was removed.  My guess is it 
caused too much trouble with upgrades to the compiler, and the command 
line use of the tools is discouraged a bit by the MS developers, I do 
not think it will ever come back as an option.  So, I really don't think 
this is a CMake problem, or something that can be solved by CMake...

-Bill


More information about the CMake mailing list