Compiling Variable generator

- added to cmakelists
- fixed compilation errors