CMake:Generators Variables CMAKE_GENERATOR the generator specified on the commandline. See also CMake Favorite site cmake-generators(7) CMake Generator Specific Information