1. 31 Jan, 2018 1 commit
    • Pavel Solodovnikov's avatar
      Reduce raw string pointers usage. · 653b8946
      Pavel Solodovnikov authored
      * Change some functions to take `std::string` instead of
        `const char*` in the following classes: `cmMakeFile`, `cmake`,
        `cmCoreTryCompile`, `cmSystemTools`,  `cmState`, `cmLocalGenerator`
        and a few others.
      * Greatly reduce using of `const char*` overloads for
        `cmSystemTools::MakeDirectory` and `cmSystemTools::RelativePath`.
      * Remove many redundant `c_str()` conversions throughout the code.
      653b8946
  2. 28 Sep, 2017 1 commit
  3. 15 Sep, 2017 1 commit
    • Brad King's avatar
      Use C++11 override instead of CM_OVERRIDE · 0b33aee4
      Brad King authored
      We now require C++11 support including `override`.  Drop use of
      the old compatibility macro.  Convert references as follows:
      
          git grep -l CM_OVERRIDE -- '*.h' '*.hxx' '*.cxx' |
            xargs sed -i 's/CM_OVERRIDE/override/g'
      0b33aee4
  4. 14 Sep, 2017 1 commit
  5. 27 Aug, 2017 1 commit
  6. 24 Aug, 2017 1 commit
  7. 01 Jun, 2017 1 commit
  8. 11 Apr, 2017 1 commit
    • Daniel Pfeifer's avatar
      Use quotes for non-system includes · 1d829c86
      Daniel Pfeifer authored
      Automate with:
      
      git grep -l '#include <cm_' -- Source \
        | xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g'
      
      git grep -l '#include <cmsys/' -- Source \
        | xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g'
      
      git grep -l '#include <cm[A-Z]' -- Source \
        | xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
      1d829c86
  9. 16 Feb, 2017 1 commit
  10. 28 Nov, 2016 1 commit
  11. 15 Nov, 2016 1 commit
  12. 27 Sep, 2016 1 commit
    • Brad King's avatar
      Simplify CMake per-source license notices · 86578ecc
      Brad King authored
      Per-source copyright/license notice headers that spell out copyright holder
      names and years are hard to maintain and often out-of-date or plain wrong.
      Precise contributor information is already maintained automatically by the
      version control tool.  Ultimately it is the receiver of a file who is
      responsible for determining its licensing status, and per-source notices are
      merely a convenience.  Therefore it is simpler and more accurate for
      each source to have a generic notice of the license name and references to
      more detailed information on copyright holders and full license terms.
      
      Our `Copyright.txt` file now contains a list of Contributors whose names
      appeared source-level copyright notices.  It also references version control
      history for more precise information.  Therefore we no longer need to spell
      out the list of Contributors in each source file notice.
      
      Replace CMake per-source copyright/license notice headers with a short
      description of the license and links to `Copyright.txt` and online information
      available from "https://cmake.org/licensing".  The online URL also handles
      cases of modules being copied out of our source into other projects, so we
      can drop our notices about replacing links with full license text.
      
      Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
      of the replacements mechanically.  Manually fix up shebang lines and trailing
      newlines in a few files.  Manually update the notices in a few files that the
      script does not handle.
      86578ecc
  13. 25 Aug, 2016 1 commit
  14. 28 Jun, 2016 1 commit
  15. 27 Jun, 2016 1 commit
    • Daniel Pfeifer's avatar
      Add CM_OVERRIDE to some functions · 7647f6af
      Daniel Pfeifer authored
      Run clang-tidy's modernize-use-override checker.  This checker must have
      issues in version 3.8.  It has way too little matches.  And it adds
      override to destructors.  Revert the changes on the destructors and
      change override to CM_OVERRIDE.
      7647f6af
  16. 16 May, 2016 1 commit
    • Kitware Robot's avatar
      Revise C++ coding style using clang-format · d9fd2f54
      Kitware Robot authored
      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
  17. 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
  18. 03 May, 2016 1 commit
  19. 29 Apr, 2016 1 commit
    • 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
  20. 01 Apr, 2016 3 commits
  21. 28 Aug, 2015 1 commit
  22. 20 Aug, 2015 1 commit
  23. 10 Feb, 2015 1 commit
  24. 15 Oct, 2014 1 commit
  25. 08 Mar, 2014 1 commit
    • Ben Boeckel's avatar
      strings: Remove cmStdString references · 270eb96d
      Ben Boeckel authored
      Casts from std::string -> cmStdString were high on the list of things
      taking up time. Avoid such implicit casts across function calls by just
      using std::string everywhere.
      
      The comment that the symbol name is too long is no longer relevant since
      modern debuggers alias the templates anyways and the size is a
      non-issue since the underlying methods are generated since it's
      inherited.
      270eb96d
  26. 07 Jan, 2014 1 commit
  27. 21 Nov, 2013 1 commit
  28. 28 Feb, 2013 1 commit
  29. 10 Mar, 2011 1 commit
    • Brad King's avatar
      CTest: Do not fail with submodules and Git < 1.6.5.0 · 732af7fb
      Brad King authored
      Several major Linux distributions still do not provide Git >= 1.6.5.0 in
      their stable package lists.  Prior to commit 1173cc4a (Update Git
      submodules with --recursive, 2011-02-22) CTest was able to use older Git
      versions but simply silently failed to update submodules recursively.
      Instead of failing with older Git versions preserve the status quo and
      add a warning in the update log.  Users testing projects with recursive
      submodules may simply update to a Git new enough to support them.
      732af7fb
  30. 22 Feb, 2011 1 commit
  31. 20 Dec, 2010 2 commits
  32. 27 Jul, 2010 1 commit
    • Brad King's avatar
      ctest_update: Run 'git submodule' at top level · a7319cf1
      Brad King authored
      The git submodule porcelain must be executed from the top level of the
      work tree.  Use 'git rev-parse --show-cdup' to find the top level
      relative to the source tree.  This is better than searching up the tree
      for .git ourselves because it will always work the same way Git does and
      thus honors settings like GIT_DISCOVERY_ACROSS_FILESYSTEM.
      a7319cf1
  33. 26 Jul, 2010 1 commit
    • Brad King's avatar
      ctest_update: Support ".git file" work trees · 7bf8dc1a
      Brad King authored
      Commit c3781efb (Support Git upstream branch rewrites, 2010-06-08)
      assumed that ".git/FETCH_HEAD" exists inside the source tree.  Fix the
      implementation to handle a work tree using a ".git file" to link to its
      repository.  Use "git rev-parse --git-dir" to locate the real .git dir.
      7bf8dc1a
  34. 20 Jul, 2010 1 commit
  35. 23 Jun, 2010 1 commit
    • Brad King's avatar
      CTest: Parse empty Git commits correctly · bbfe241c
      Brad King authored
      Git's diff-tree format has no '\n'-terminated blank line at the end of
      its commit message body block if there are no diff lines.  Instead the
      message body is terminated by '\0' and there is no diff section.  Teach
      CTest to parse the format in this case.
      bbfe241c
  36. 08 Jun, 2010 2 commits
    • Brad King's avatar
      ctest_update: Support Git upstream branch rewrites · c3781efb
      Brad King authored
      Use 'git fetch' followed by 'git reset' to update the source tree.  This
      is better than 'git pull' because it can handle a rewritten upstream
      branch and does not leave local modifications.  After fetch, parse
      FETCH_HEAD to find the merge head that 'git pull' would choose to track
      the upstream branch.  Then reset to the selected head.
      
      In the normal fast-forward case the behavior remains unchanged.
      However, now local modifications and commits will be erased, and
      upstream rewrites are handled smoothly.  This ensures that the upstream
      branch is tested as expected.
      c3781efb
    • Brad King's avatar
      ctest_update: Support custom Git update command · 2eae651a
      Brad King authored
      Define CTest configuration variable CTEST_GIT_UPDATE_CUSTOM to set a
      custom command line for updating Git-managed source trees.
      2eae651a