# How to know the generator previously used ?

**URL:** <https://discourse.cmake.org/t/how-to-know-the-generator-previously-used/12748>\
**Category:** Code\
**Created:** [October 10, 2024, 11:28am UTC](https://discourse.cmake.org/t/how-to-know-the-generator-previously-used/12748 "2024-10-10T11:28:44Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![scivision](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@scivision](https://discourse.cmake.org/u/scivision)\
**Post date:** [October 10, 2024, 8:03pm UTC](https://discourse.cmake.org/t/how-to-know-the-generator-previously-used/12748/2 "2024-10-10T20:03:04Z")

</div>

Can you parse CMakeCache.txt for `CMAKE_GENERATOR:INTERNAL=Ninja` and similar? This is how I’ve done things like this from Python say.

---

_[View the full topic](https://discourse.cmake.org/t/how-to-know-the-generator-previously-used/12748)._
