Yes there are a number of pitfalls to watch out for, but there are probably a similar number of Linux pitfalls. Like when I tried to build plplot on my Ubuntu 11.04 (I think that's the right version number - the previous LTS) machine and the repositories didn't include a high enough version number of CMake or the fun of trying to distribute binaries between different Linux flavours. I had some colleagues recently at another institute and it took them around two years to convince the system admins to allow wxWidgets to be installed on the system so they couldn't run or build software I'd written or built - static linkage would have been a saviour there. Anyway I'm a fan of both and use both so I'm not going to start a who's got the best OS discussion
Re the debug flag patch I haven't even had chance to look, nor am I really sure where to start. Actually it would be good to get some advice before I dive in. How do you go about debugging Cmake code? Is there any sort of debug tool or is it just a case of outputting variables to the console? In the Microsoft debugger I can stop C/C++ code at a break point and step through and see how variables are changed (Eclipse has similar functionality). I guess it's too much to ask for similar functionality with cmake, but if you have any useful debugging tips they'd be appreciated.