I think CMake is one of the best (not saying it's perfect) C/C++ build systems I've used (used jam, make, automake, qmake, scons quite comprehensively, either via choice or under duress), and there are some things that are close to impossible (or were a few years ago).
One of these was getting an executable that's built as part of a script to generate a .cpp which is then built as another lib as a further dependency within the same build - I believe that's possible now as OpenEXR does it. Similarly, I've had to run external programs that binary patch executables and had serious issues doing that.
That isn't all that hard to do, CMake routinely supports this for e.g. Swig or Qt's moc/uic/rcc tools. The code generator creates a bunch of files and those can be either built as a library or added to your normal list of sources.