[cmake-developers] Code style auto-formatting

Robert Dailey rcdailey.lists at gmail.com
Thu Nov 19 09:22:47 EST 2015


On Wed, Nov 18, 2015 at 5:47 PM, Alan W. Irwin
<irwin at beluga.phys.uvic.ca> wrote:
> On 2015-11-17 16:44-0600 Robert Dailey wrote:
>
>> [...]Honestly all of this is a matter of taste, I don't expect
>> everyone to agree on every little detail. I think the goal should be
>> to strive for something a little more modern (determined by general
>> consensus in the open source community) and most importantly enforce
>> it. No matter what style you choose, consistency is what matters the
>> most.
>
>
> Well said.  We used similar principles in the PLplot case and the
> resulting code style consistency (implemented with uncrustify in that
> case) within that project has been quite beneficial.

Tonight I will do some testing and submit a patch + example files
converted to the style Brad suggested. We can fine-tune it as needed.
I'll probably format cmake.h / cmake.cxx as an example.

Note also that there is an extension for Visual Studio that lets you
run clang format. I've used this and it's pretty useful. The link
below (bottom of the page) has the link to download the plugin.

http://llvm.org/builds/


More information about the cmake-developers mailing list