Right way to regenerate config.h.cmake

I want to add new cmake variable into CMakeLists.txt, and want to bypass it into “config.h”.
I found that in order to get correct “config.h” you should also update “config.h.cmake”. The latter is autogenerated.

So the question is how to update this “config.h.cmake” properly. I beleive somehow I should call BUILD.gn scripts.
I suppose this is something like “gn gen”. But perhaps I should use a particular version of “gn”. Or can I just edit “config.h.cmake” manually?

Stepan Dyatkovskiy