[CMake] Getting the Generator during CMAKE

Alexander Neundorf a.neundorf-work at gmx.net
Fri Mar 27 16:45:36 EDT 2009


On Friday 27 March 2009, Neal Meyer wrote:
> I need to have my CMakeLists file do different things depending on the
> Generator that is being used.  Mostly passing on that version information
> to a build of a 3rd party library.  Is there a way to get that information
> during the CMake run?

You can test CMAKE_GENERATOR (and CMAKE_EXTRA_GENERATOR if you are using the 
KDevelop, Eclipse or CodeBlocks generators).

Alex


More information about the CMake mailing list