I have been working on a source build process on a x86-based cluster for which I have no elevated privileges. I encountered a couple of problems on the way that I thought I would pass along for possible attention in future versions. These were very difficult to discover, in part due to the many, many layers of CMake obscurity so I think at least a documentation mention might help someone in the future.
First, the version values set and referenced in version.hpp (e.g., NETGEN_VERSION, NGSOLVE_VERSION) seem to be derived from labels in the .git files from the “git clone.” This was very surprising to see source code and file management linked like this and I would encourage the developers to eliminate this dependency. For my part, I deleted the .git* files after cloning because I wanted to create my own git repository for privately tracking my own changes, never dreaming that I would be breaking the source code by doing so. That was a really nasty landmine.
Second, I built my own TclTK from source. When compiling ngsolve-src, I found that it couldn’t find Tkint.h because the path to it that was constructed in netgen/netgen/ng/Togl2.1/CMakeFiles/togl.dir/flags.make expected a “include/tk-private” directory but my freshly-built TclTk doesn’t have a tk-private directory. I am not an expert in TclTk, but from what I have read, this isn’t a standard location. I ended up having to edit flags.make, after running “make,” since it is the Make process that creates flags.make, and then rerunning “make” with the edited file. Not pretty. It would be nice if the top-level TCL_ and TK_ CMake settings would propagate down to togl.dir.