Discussion:
[CMake] How to change/set default generator
David Genest
2008-12-10 16:01:07 UTC
Permalink
Hi fellow cmakers,

Is it possible to set the default generator cmake uses so it is not
necessary to specify it at the command line ? Right now, on my windows
version of cmake 2.6.2, the default generator is "Visual Studio 8 2005".
I would like it to be "Visual Studio 9 2008".

Thanks,

D.
David Genest
2008-12-10 17:45:09 UTC
Permalink
Don't both CMake GUIs remember the last chosen generator in the event
you
are configuring a new build?
Yes, once configured the gui and cmake use the chosen generator. I was
probably unclear. I would like to configure cmake so that the first call
of cmake on the command line on a new project without a -G parameter
uses the "Visual Studio 9 2008" by default.
Michael Jackson
2008-12-10 18:17:34 UTC
Permalink
I am going to guess that you need to get the source for CMake, make a
change somewhere and then recompile. Just a guess.

_________________________________________________________
Mike Jackson ***@bluequartz.net
www.bluequartz.net
Post by David Genest
Don't both CMake GUIs remember the last chosen generator in the event
you
are configuring a new build?
Yes, once configured the gui and cmake use the chosen generator. I was
probably unclear. I would like to configure cmake so that the first call
of cmake on the command line on a new project without a -G parameter
uses the "Visual Studio 9 2008" by default.
_______________________________________________
CMake mailing list
http://www.cmake.org/mailman/listinfo/cmake
David Cole
2008-12-10 18:37:24 UTC
Permalink
Line 2009 of CMake/Source/cmake.cxx chooses the default Visual Studio
generator. Looks like that block of code forgot to update itself when Visual
Studio 9 support was added.
We should, of course, prefer the most recent VS available as the default.

I will add some code to CVS CMake to do this, but I may not get to it for a
few days.

HTH,
David


On Wed, Dec 10, 2008 at 1:17 PM, Michael Jackson <
Post by Michael Jackson
I am going to guess that you need to get the source for CMake, make a
change somewhere and then recompile. Just a guess.
_________________________________________________________
www.bluequartz.net
Don't both CMake GUIs remember the last chosen generator in the event
Post by David Genest
you
are configuring a new build?
Yes, once configured the gui and cmake use the chosen generator. I was
probably unclear. I would like to configure cmake so that the first call
of cmake on the command line on a new project without a -G parameter
uses the "Visual Studio 9 2008" by default.
_______________________________________________
CMake mailing list
http://www.cmake.org/mailman/listinfo/cmake
_______________________________________________
CMake mailing list
http://www.cmake.org/mailman/listinfo/cmake
David Genest
2008-12-10 18:50:42 UTC
Permalink
Post by David Cole
Line 2009 of CMake/Source/cmake.cxx chooses the default Visual Studio
generator. Looks > like that block of code forgot to update itself when
Visual Studio 9 support was added.
Post by David Cole
We should, of course, prefer the most recent VS available as the default.
I will add some code to CVS CMake to do this, but I may not get to it
for a few days.

I'm a bit surprised that this is hardcoded. Shouldn't it be possible to
add this preference in a configuration file ? Then, the block of code
would never forget to update itself :-).

D.
Hendrik Sattler
2008-12-10 22:30:51 UTC
Permalink
Post by David Genest
Post by David Cole
Line 2009 of CMake/Source/cmake.cxx chooses the default Visual Studio
generator. Looks > like that block of code forgot to update itself when
Visual Studio 9 support was added.
Post by David Cole
We should, of course, prefer the most recent VS available as the
default.
Post by David Cole
I will add some code to CVS CMake to do this, but I may not get to it
for a few days.
I'm a bit surprised that this is hardcoded. Shouldn't it be possible to
add this preference in a configuration file ? Then, the block of code
would never forget to update itself :-).
Or add a small .bat file that calls cmake with all of your preferred options.
Not very uncommon and you can even switch between different option sets
easily ;)

HS

Loading...