To add a private member variable or function, you need to put it in the class definition in the header file. Then anything that includes the header needs to be recompiled.
But even if you managed to do that, first compilation is still much slower than it should be, because anlot of headers have to be included (transitively) to allow even declaring these fields and methods.