CMake/Source/CPack
Brad King 64b5520346 Isolate formatted streaming blocks with clang-format off/on
The clang-format tool can do a good job formatting most code, but
well-organized streaming blocks are best left manually formatted.

Find blocks of the form

    os <<
      "...\n"
      "...\n"
      ;

using the command

    $ git ls-files -z -- Source |
      egrep -v -z '^Source/kwsys/' |
      xargs -0 pcregrep -M --color=always -B 1 -A 1 -n \
        '<<[^\n]*\n(^ *("[^\n]*("|<<|;)$|;)\n){2,}'

Find blocks of the form

    os << "...\n"
       << "...\n"
       << "...\n";

using the command

    $ git ls-files -z -- Source |
      egrep -v -z '^Source/kwsys/' |
      xargs -0 pcregrep -M --color=always -B 1 -A 1 -n \
        '<<[^\n]*\n(^ *<<[^\n]*(\\n"|<<|;)$\n){2,}'

Surround such blocks with the pair

    /* clang-format off */
    ...
    /* clang-format on */

in order to protect them from update by clang-format.  Use the C-style
`/*...*/` comments instead of C++-style `//...` comments in order to
prevent them from ever being swallowed by re-formatting of surrounding
comments.
2016-05-06 14:25:55 -04:00
..
IFW Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
WiX Source: Sort includes the way clang-format would 2016-05-03 10:08:41 -04:00
OSXLauncherScript.scpt BUG: Fix issue #7833: Add file extension handling to CPack generated installers for OSXX11 applications. Also modify the X11 test to build such an installer on Mac builds that test CPack and have X11 available. Thanks to Wes Turner for the patch. 2009-01-21 11:54:30 -05:00
OSXScriptLauncher.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
bills-comments.txt Remove trailing whitespace from most CMake and C/C++ code 2012-08-13 14:18:39 -04:00
cmCPack7zGenerator.cxx cmake: Teach "-E tar" command a "--format=" option 2015-04-10 08:32:31 -04:00
cmCPack7zGenerator.h CPack: add generators for .7z and .tar.xz (#13072, #14519) 2014-07-29 09:48:41 -04:00
cmCPackArchiveGenerator.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCPackArchiveGenerator.h Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmCPackBundleGenerator.cxx Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmCPackBundleGenerator.h CPack: Add support for code signing of bundles on MacOS 2014-10-28 12:20:05 -06:00
cmCPackComponentGroup.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCPackComponentGroup.h stringapi: Miscellaneous char* parameters 2014-03-08 13:05:37 -05:00
cmCPackConfigure.h.in Convert CMake to OSI-approved BSD License 2009-09-28 11:43:28 -04:00
cmCPackCygwinBinaryGenerator.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCPackCygwinBinaryGenerator.h CPack: Refactor API in order to handle multi-file packages 2010-08-11 14:09:52 -04:00
cmCPackCygwinSourceGenerator.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCPackCygwinSourceGenerator.h CPack: Refactor API in order to handle multi-file packages 2010-08-11 14:09:52 -04:00
cmCPackDebGenerator.cxx Source: Stabilize include order of sys/types.h before sys/stat.h 2016-05-03 10:08:41 -04:00
cmCPackDebGenerator.h Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmCPackDragNDropGenerator.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCPackDragNDropGenerator.h CPack/DragNDrop: Fix handling of certain license file content (#15899) 2016-01-07 15:24:42 -05:00
cmCPackGenerator.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCPackGenerator.h Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmCPackGeneratorFactory.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCPackGeneratorFactory.h strings: Remove cmStdString references 2014-03-08 13:05:35 -05:00
cmCPackLog.cxx Replace 'foo.size() > 0' pattern with !foo.empty(). 2015-01-18 14:25:24 +01:00
cmCPackLog.h Port all cmOStringStream to std::ostringstream. 2015-01-11 17:06:03 +01:00
cmCPackNSISGenerator.cxx Isolate formatted streaming blocks with clang-format off/on 2016-05-06 14:25:55 -04:00
cmCPackNSISGenerator.h Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmCPackOSXX11Generator.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCPackOSXX11Generator.h stringapi: Miscellaneous char* parameters 2014-03-08 13:05:37 -05:00
cmCPackPackageMakerGenerator.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cmCPackPackageMakerGenerator.h Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmCPackRPMGenerator.cxx Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmCPackRPMGenerator.h Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmCPackSTGZGenerator.cxx Source: Stabilize include order of sys/types.h before sys/stat.h 2016-05-03 10:08:41 -04:00
cmCPackSTGZGenerator.h Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmCPackTGZGenerator.cxx cmake: Teach "-E tar" command a "--format=" option 2015-04-10 08:32:31 -04:00
cmCPackTGZGenerator.h Switch to using libarchive from libtar for cpack and cmake -E tar 2009-10-30 13:10:56 -04:00
cmCPackTXZGenerator.cxx cmake: Teach "-E tar" command a "--format=" option 2015-04-10 08:32:31 -04:00
cmCPackTXZGenerator.h CPack: add generators for .7z and .tar.xz (#13072, #14519) 2014-07-29 09:48:41 -04:00
cmCPackTarBZip2Generator.cxx Source: Stabilize include order 2016-04-29 13:58:31 -04:00
cmCPackTarBZip2Generator.h Switch to using libarchive from libtar for cpack and cmake -E tar 2009-10-30 13:10:56 -04:00
cmCPackTarCompressGenerator.cxx cmake: Teach "-E tar" command a "--format=" option 2015-04-10 08:32:31 -04:00
cmCPackTarCompressGenerator.h Switch to using libarchive from libtar for cpack and cmake -E tar 2009-10-30 13:10:56 -04:00
cmCPackZIPGenerator.cxx cmake: Teach "-E tar" command a "--format=" option 2015-04-10 08:32:31 -04:00
cmCPackZIPGenerator.h Switch to using libarchive from libtar for cpack and cmake -E tar 2009-10-30 13:10:56 -04:00
cpack.cxx Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
cygwin.readme Remove trailing whitespace from most CMake and C/C++ code 2012-08-13 14:18:39 -04:00