[CMake] Why does changing -G not change generators?

Paul Smith paul at mad-scientist.net
Tue Jul 14 11:01:45 EDT 2015


We have a situation where people are sometimes wanting to switch between
different generators: from Xcode to Unix Makefiles, or from Visual
Studio 2010 to Visual Studio 2012, etc.

If they have an already-configured workspace then run "cmake -G" with a
different generator, it appears to be a no-op: no error is generated but
no changes are made and the previous generator is still used.

This doesn't seem right to me... shouldn't giving a new generator type
on the command line change the output for the new generator?  I'm using
CMake 3.1.0... maybe this has changed since?

Cheers!



More information about the CMake mailing list