2012/2/7 Sarnath K - ERS, HCLTech <k_sarn...@hcl.com>: > Hello Friends, > > How do I specify the default generator that CMAKE should use when invoked > without the “-G” option? > > I am on Windows. > > I saw an old thread on this. But I am not sure if any support was added > later on. > > > Is there a REGISTRY entry in Windows that we can set to make so that CMAKE > can check it?
When starting with an empty build tree (or more precisely with empty cache) the logic of the "default generator" is implement in: Source/cmake.cxx::int cmake::ActualConfigure() There is some system dependent macro logic and in the Windows case the code comment says (if not in Borland or Cygwin or Mingw case): // Try to find the newest VS installed on the computer and // use that as a default if -G is not specified So no, as far as I understand the code, there is no registry entry that could possibly be set to force a particular default. I guess it shouldn't be that hard to implement but it is not there. (I'm not willing to try myself because I'm not a Windows user/developer) Nevertheless, may be you can explain us why you would like to setup a default? Is it too painful to add the extra -G argument? -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org -- 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