Skip to content
Snippets Groups Projects
  1. Jul 23, 2020
  2. May 26, 2020
  3. May 08, 2020
  4. Apr 09, 2020
  5. Mar 31, 2020
  6. Mar 03, 2020
    • Hans Johnson's avatar
      STYLE: Use auto for variable type matches the type of the initializer · cc8fc323
      Hans Johnson authored
      This check is responsible for using the auto type specifier for variable
      declarations to improve code readability and maintainability.
      
      The auto type specifier will only be introduced in situations where the
      variable type matches the type of the initializer expression. In other words
      auto should deduce the same type that was originally spelled in the source
      cc8fc323
    • Hans Johnson's avatar
      PERF: emplace_back method results in potentially more efficient code · 91429382
      Hans Johnson authored
      The check flags insertions to an STL-style container done by calling the
      push_back method with an explicitly-constructed temporary of the container
      element type. In this case, the corresponding emplace_back method results in
      less verbose and potentially more efficient code.
      91429382
  7. Feb 18, 2020
  8. Feb 13, 2020
  9. Sep 17, 2019
  10. Aug 19, 2019
  11. Jul 24, 2019
  12. Jan 23, 2019
  13. Jun 09, 2018
  14. May 31, 2018
    • Kitware Robot's avatar
      Revise C++ coding style using clang-format-6.0 · 828b6837
      Kitware Robot authored and Brad King's avatar Brad King committed
      Run the `clang-format.bash` script to update all our C and C++ code to a
      new style defined by `.clang-format`.  Use `clang-format` version 6.0.
      
      * 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.
      828b6837
  15. May 18, 2018
    • Peter Wu's avatar
      SystemTools: Fix GetLineFromStream to avoid libc++ bug on OS X 10.7 · 898dc6b9
      Peter Wu authored and Brad King's avatar Brad King committed
      LLVM libc++ as included with Mac OS X 10.7 suffers from an issue where
      the trailing character is discarded when the delimiter (LF) is not found
      within the given buffer size (1024).  The returned length is also 1024
      rather than 1023.
      
      This issue results in truncated reads as observed with CMake 3.11.0 on
      Mac OS X 10.7 and `cmake -E cmake_link_script link.txt`.
      
      Solve this by replacing `istream::getline` by `std::getline` which does
      not trigger the buffering issue.  There is one edge case that I decided
      to leave up to the callers though: a file containing `\0` previously
      resulted in line truncation, but is now included in the result.
      
      Tested with Mac OS X 10.7 and 10.11:
      
          -DCMAKE_OSX_DEPLOYMENT_TARGET=10.7 -DCMAKE_CXX_FLAGS=-stdlib=libc++
      
      and `./kwsysTestsCxx testSystemTools`.
      
      Issue: cmake/cmake#15039
      898dc6b9
  16. Mar 07, 2018
  17. Jan 31, 2018
  18. Dec 21, 2017
  19. Dec 09, 2017
  20. Oct 05, 2017
  21. Sep 29, 2017
  22. Aug 03, 2017
  23. May 29, 2017
  24. May 06, 2017
  25. Apr 17, 2017
    • Brad King's avatar
      Encoding: Add ToWindowsExtendedPath function · e71a3406
      Brad King authored
      Move the implementation of `SystemTools::ConvertToWindowsExtendedPath`
      over to a new function in `Encoding`.  It does not depend on other
      things `SystemTools` and will be useful in other KWSys components
      that already depend on `Encoding` but not `SystemTools`.
      e71a3406
  26. Mar 29, 2017
  27. Jan 15, 2017
    • Brad King's avatar
      SystemTools: Fix conversion warning in test case · e08eee61
      Brad King authored
      ```
      testSystemTools.cxx:901:32: warning: comparison of integers of different
        signs: 'size_type' (aka 'unsigned long') and 'long' [-Wsign-compare]
          if (!result || line.size() != size) {
                         ~~~~~~~~~~~ ^  ~~~~
      ```
      e08eee61
  28. Jan 09, 2017
  29. Nov 04, 2016
    • Kitware Robot's avatar
      Revise C++ coding style using clang-format · 6c973b46
      Kitware Robot authored and Brad King's avatar Brad King committed
      Run the `clang-format.bash` script to update all our C and 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.
      
      Change-Id: Ie3aedc03bfe5c3999d4a077fafb8c6f3bbffc5c5
      6c973b46
    • Brad King's avatar
      Simplify KWSys per-source license notices · c41c1bc4
      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 KWSys 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#kwsys".
      
      Run the `filter-notices.bash` script to perform the replacements mechanically.
      Manually fix up the shebang line in one file.
      
      Change-Id: I8497f7c868664dcf54a8608ab302ad93c860b334
      c41c1bc4
  30. Sep 14, 2016
  31. Aug 03, 2016
    • Ben Boeckel's avatar
      SystemTools: add a PathExists method · 6d23dd7e
      Ben Boeckel authored
      This method checks if a path by the given name exists. The problem with
      FileExists is that it returns `false` even for broken (or
      self-referential) symlinks which may not be what the user wants.
      
      Change-Id: I71b8af6e12a5ae4b1319a3bec83db6c3cef36f90
      6d23dd7e
  32. Jul 18, 2016
  33. Dec 02, 2015
  34. Sep 28, 2015
    • Vitaly Baranov's avatar
      SystemTools: Fix GetPath to not affect existing output vector entries · 2089567a
      Vitaly Baranov authored and Brad King's avatar Brad King committed
      The GetPath method appends paths to an output vector and also converts
      paths to forward slashes.  However, the method should not modify entries
      in the output vector that existed prior to the call.  Fix it to only fix
      slashes in the entries it added to the vector.  Also add a test case
      covering this behavior.
      
      Change-Id: Ie098c3eddbe63ed59f0d393aa6c43ea6c395011d
      2089567a
Loading