1. 16 Aug, 2016 1 commit
  2. 18 Jul, 2016 1 commit
  3. 29 Jun, 2016 1 commit
    • Brad King's avatar
      Avoid using KWSys auto_ptr by adopting it ourselves · b5ec5b09
      Brad King authored
      Replace use of cmsys::auto_ptr with a CM_AUTO_PTR macro that maps to
      our own implementation adopted from the KWSys auto_ptr implementation.
      Later we may be able to map CM_AUTO_PTR to std::auto_ptr on compilers
      that do not warn about it.
      
      Automate the client site conversions:
      
          git grep -l auto_ptr -- Source/ | grep -v Source/kwsys/ | xargs sed -i \
            's|cmsys::auto_ptr|CM_AUTO_PTR|;s|cmsys/auto_ptr.hxx|cm_auto_ptr.hxx|'
      b5ec5b09
  4. 28 Jun, 2016 1 commit
  5. 27 Jun, 2016 2 commits
  6. 14 Jun, 2016 1 commit
  7. 10 Jun, 2016 1 commit
  8. 08 Jun, 2016 1 commit
  9. 06 Jun, 2016 1 commit
  10. 02 Jun, 2016 2 commits
  11. 26 May, 2016 3 commits
    • Daniel Pfeifer's avatar
      Remove redundant c_str() calls. · 1b2bb933
      Daniel Pfeifer authored
      Run clang-tidy's readability-redundant-string-cstr checker.
      Ignore findings in kwsys.
      1b2bb933
    • Daniel Pfeifer's avatar
      Remove unnecessary local copies. · 27ead963
      Daniel Pfeifer authored
      Use clang-tidy's performance-unnecessary-copy-initialization checker.
      After applying the fix-its (which turns the copies into const&), revise
      the changes and see whether the copies can be removed entirely by using
      the original instead.
      27ead963
    • Daniel Pfeifer's avatar
      Pass arguments that are not modified as const&. · 618fb23f
      Daniel Pfeifer authored
      Use clang-tidy's performance-unnecessary-value-param checker to find
      value parameter declarations of expensive to copy types that are not
      modified inside the function.  Ignore findings in kwsys.
      After applying the fix-its, manually change `const T&` to `T const&`.
      618fb23f
  12. 24 May, 2016 2 commits
  13. 16 May, 2016 1 commit
    • Kitware Robot's avatar
      Revise C++ coding style using clang-format · d9fd2f54
      Kitware Robot authored and Brad King's avatar Brad King committed
      Run the `Utilities/Scripts/clang-format.bash` script to update
      all our C++ code to a new style defined by `.clang-format`.
      Use `clang-format` version 3.8.
      
      * If you reached this commit for a line in `git blame`, re-run the blame
        operation starting at the parent of this commit to see older history
        for the content.
      
      * See the parent commit for instructions to rebase a change across this
        style transition commit.
      d9fd2f54
  14. 11 May, 2016 1 commit
  15. 09 May, 2016 1 commit
    • Brad King's avatar
      Remove `//------...` horizontal separator comments · 0ac18d40
      Brad King authored
      Modern editors provide plenty of ways to visually separate functions.
      Drop the explicit comments that previously served this purpose.
      Use the following command to automate the change:
      
          $ git ls-files -z -- \
              "*.c" "*.cc" "*.cpp" "*.cxx" "*.h" "*.hh" "*.hpp" "*.hxx" |
            egrep -z -v "^Source/cmCommandArgumentLexer\." |
            egrep -z -v "^Source/cmCommandArgumentParser(\.y|\.cxx|Tokens\.h)" |
            egrep -z -v "^Source/cmDependsJavaLexer\." |
            egrep -z -v "^Source/cmDependsJavaParser(\.y|\.cxx|Tokens\.h)" |
            egrep -z -v "^Source/cmExprLexer\." |
            egrep -z -v "^Source/cmExprParser(\.y|\.cxx|Tokens\.h)" |
            egrep -z -v "^Source/cmFortranLexer\." |
            egrep -z -v "^Source/cmFortranParser(\.y|\.cxx|Tokens\.h)" |
            egrep -z -v "^Source/cmListFileLexer\." |
            egrep -z -v "^Source/cm_sha2" |
            egrep -z -v "^Source/(kwsys|CursesDialog/form)/" |
            egrep -z -v "^Utilities/(KW|cm).*/" |
            xargs -0 sed -i '/^\(\/\/---*\|\/\*---*\*\/\)$/ {d;}'
      
      This avoids modifying third-party sources and generated sources.
      0ac18d40
  16. 06 May, 2016 2 commits
    • Brad King's avatar
      Move comments off of class access specifier lines · 85425a3e
      Brad King authored
      The clang-format tool may turn this:
      
         public: // comment about access specifier
      
           // unrelated comment indented with code
           ...
      
      Into:
      
         public: // comment about access specifier
      
                 // unrelated comment indented with code
           ...
      
      Avoid this by moving comments off of access specifier lines.
      85425a3e
    • Brad King's avatar
      Isolate formatted streaming blocks with clang-format off/on · 64b55203
      Brad King authored
      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.
      64b55203
  17. 03 May, 2016 1 commit
  18. 29 Apr, 2016 2 commits
    • Brad King's avatar
      Format include directive blocks and ordering with clang-format · e1c77472
      Brad King authored
      
      
      Sort include directives within each block (separated by a blank line) in
      lexicographic order (except to prioritize `sys/types.h` first).  First
      run `clang-format` with the config file:
      
          ---
          SortIncludes: false
          ...
      
      Commit the result temporarily.  Then run `clang-format` again with:
      
          ---
          SortIncludes: true
          IncludeCategories:
            - Regex:    'sys/types.h'
              Priority: -1
          ...
      
      Commit the result temporarily.  Start a new branch and cherry-pick the
      second commit.  Manually resolve conflicts to preserve indentation of
      re-ordered includes.  This cleans up the include ordering without
      changing any other style.
      
      Use the following command to run `clang-format`:
      
          $ git ls-files -z -- \
              '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' |
            egrep -z -v '(Lexer|Parser|ParserHelper)\.' |
            egrep -z -v '^Source/cm_sha2' |
            egrep -z -v '^Source/(kwsys|CursesDialog/form)/' |
            egrep -z -v '^Utilities/(KW|cm).*/' |
            egrep -z -v '^Tests/Module/GenerateExportHeader' |
            egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' |
            xargs -0 clang-format -i
      
      This selects source files that do not come from a third-party.
      Inspired-by: Daniel Pfeifer's avatarDaniel Pfeifer <daniel@pfeifer-mail.de>
      e1c77472
    • Brad King's avatar
      Source: Stabilize include order · 180538c7
      Brad King authored
      Each source file has a logical first include file.  Include it in an
      isolated block so that tools that sort includes do not move them.
      180538c7
  19. 01 Apr, 2016 3 commits
  20. 30 Mar, 2016 1 commit
  21. 29 Mar, 2016 1 commit
  22. 23 Mar, 2016 1 commit
    • Zack Galbreath's avatar
      CTest: Only apply the secondary test timeout once · 06b7f5d2
      Zack Galbreath authored
      This commit fixes a bug in the implementation of the test property
      TIMEOUT_AFTER_MATCH.  The new timeout value was being applied
      every time a line was output by the test after the match had been
      encountered.  Now the new timeout value is only set once.
      
      This commit also improves some output formatting related to this
      property.
      06b7f5d2
  23. 22 Mar, 2016 1 commit
  24. 25 Feb, 2016 1 commit
    • Joe Snyder's avatar
      CTest: Make coverage file selection more specific. · bc29ed54
      Joe Snyder authored
      When performing some other testing, the globs for Blanket.js and Delphi
      code coverage are picking up unintended files.  Change the query for the
      Delphi coverage to follow the naming convention, and check the second line
      of the found JSON files for certain text before parsing them as coverage files.
      bc29ed54
  25. 13 Jan, 2016 1 commit
  26. 23 Nov, 2015 1 commit
    • Joe Snyder's avatar
      CTest: Expand directories for Cobertura search · 32268810
      Joe Snyder authored and Brad King's avatar Brad King committed
      Change the Cobertura handler to look for an environment variable
      called "COBERTURADIR" which contains the directory where the
      coverage.xml file is found.  If that variable doesn't exist,
      continue to use the default of the binary directory.
      
      Update the test to use an appropriate value in the environment
      variables.
      32268810
  27. 16 Nov, 2015 1 commit
  28. 11 Nov, 2015 1 commit
  29. 23 Oct, 2015 1 commit
    • Brad King's avatar
      CTest: Fix regression in handling of a RUN_SERIAL test that fails · e61973e1
      Brad King authored
      Refactoring in commit v3.4.0-rc1~390^2~1 (cmCTestMultiProcessHandler:
      Refactor RUN_SERIAL implementation, 2015-06-01) forgot to update a code
      path for cleaning up after a failed RUN_SERIAL test.  This causes an
      infinite loop after a RUN_SERIAL test fails.  Fix it and add a test.
      e61973e1
  30. 13 Oct, 2015 1 commit
  31. 12 Oct, 2015 1 commit