Thanks to everyone for all the helpful responses. It looks like most of the ideas were pretty similar to what I was thinking. Glad to know I wasn't missing anything huge.
I had found UniversalIndentGUI and plan on using it. I had also found uncrustify and will take a closer look at it. On Fri, Jan 31, 2014 at 1:55 AM, Игорь Пашев <pashev.i...@gmail.com> wrote: > Code formatting is completely out of scope of building system. > I think that CMake has historically trended towards an expansionist view of what it can/should be used for, not a restrictionist one. I think a lot of the other posters make good cases for why this may be a good idea. In general, I think of CMake as a tool that helps to standardize working with code. That can be cross platform builds, support for build farms and unit testing, automatic documentation generation, packaging of the project, etc. I want to clean up a large codebase with years of formatting neglect in an automated way. AStyle or Uncrustify are the right tool for this. I would like to give my team an easy way to check the formatting against the same style. Including a config file or the full command line with options is a good tool for this. My team works on different platforms, so a FindAStyle.cmake which just uses Find_Program and CMake's cross platform scripting are good solutions to make this easy. Including format checking or reformatting as build targets increase the probability that my team will use these tools. With CMake, those build targets show up for my team, no matter whether they use Make, Visual Studio, Eclipse, etc. If our project someday graduates to a more advanced level, then the kind of integration that BRL-CAD uses with automatic format checks with warnings on every build could be a good step -- and CMake would be a good tool to help make that happen. Rob
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake