On 2014-01-31 02:01, Rob McDonald wrote:
I'm interested in adding a code beautifier to my project. I'm looking at
AStyle, but am open to others.
Implementing a FindAStyle.cmake is pretty trivial. Likewise, implementing
custom targets is pretty straightforward in the simple case.
However, I thought there might be some canonical/idiomatic examples of this
sort of thing. Any pointers to projects that do this particularly well?
Are there any other code beautifiers that already have CMake support?
By "CMake support", do you mean that can beautify CMake script? Or that
have an existing find module? (For a program like this I'm not sure I'd
bother with a find module; often, find_program is all you really need.)
As far as recommended C/C++ beautifiers, these days you might want to
look at clang-format... parsing C++ is getting harder and harder with
C++11 and later; as such it stands to reason that a tool that is backed
by a well maintained, full-blown C++ parser is likely to be beneficial.
I do use astyle for some of my own projects, but I've found that I have
to do a non-trivial amount of additional pre- and post-processing to get
good results.
--
Matthew
--
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