1. 13 Apr, 2021 4 commits
  2. 05 Mar, 2021 1 commit
  3. 03 Aug, 2020 1 commit
  4. 26 May, 2020 1 commit
  5. 22 Apr, 2020 1 commit
  6. 06 Apr, 2020 1 commit
    • Vladimir's avatar
      SystemTools: Teach FindProgram to find non-readable programs · 66724af8
      Vladimir authored
      This commit fixes FindProgram failing to detect executable without
      read bit set. find_program internally uses SystemTools::FileExists which
      calls access(R_OK) instead of access(X_OK).
      Replacing SystemTools::FileExists with SystemTools::TestFileAccess fixes
      this issue.
      
      Fine example of such program is sudo.
      66724af8
  7. 04 Apr, 2020 3 commits
  8. 18 Feb, 2020 1 commit
  9. 17 Sep, 2019 1 commit
  10. 17 Apr, 2019 1 commit
    • Ben Boeckel's avatar
      SystemTools: support hiding the translation map · 84bd7c9e
      Ben Boeckel authored
      When determining full paths, CMake would treat the as-called path for
      the source and build directories as real paths even if they were
      symlinks. This causes problems when determining the relative path
      between the source and build directories when they are symlinks.
      
      Take the following setup as an example:
      
          /mnt/src/project/
              src/
              build/ -> /mnt/builds/project/build
      
      With the translation map and /mnt/src/project/build/ as the build
      directory, CMake would use ../src as the relative path to the source
      tree from the build tree rather than ../../../src/project/src and
      lookups using ../src would fail. If the build directory were instead
      used *as* /mnt/builds/project/build, everything would work just
      fine.
      
      This patch makes the core logic which does this logic optional so that
      it can be experimented with in CMake itself.
      84bd7c9e
  11. 19 Mar, 2019 8 commits
  12. 17 Mar, 2019 1 commit
    • Sebastian Holtermann's avatar
      SystemTools: Add SystemToolsStatic class skeleton · 6fed6364
      Sebastian Holtermann authored
      The new private class SystemToolsStatic is supposed to hold all static
      SystemTools variables in a single singleton class.  Static SystemTools
      variables will be moved to SystemToolsStatic in following commits.  This patch
      only adds the class skeleton type, its allocation and deletion.
      6fed6364
  13. 04 Feb, 2019 1 commit
  14. 23 Jan, 2019 1 commit
  15. 21 Jun, 2018 1 commit
  16. 31 May, 2018 1 commit
    • Kitware Robot's avatar
      Revise C++ coding style using clang-format-6.0 · 828b6837
      Kitware Robot authored
      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
  17. 18 May, 2018 1 commit
    • Peter Wu's avatar
      SystemTools: Fix GetLineFromStream to avoid libc++ bug on OS X 10.7 · 898dc6b9
      Peter Wu authored
      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
  18. 06 Mar, 2018 1 commit
  19. 03 Jan, 2018 1 commit
  20. 03 Nov, 2017 1 commit
    • luz.paz's avatar
      Fix trivial typos in text · 9a1d5901
      luz.paz authored
      Found using
      
          codespell -q 3 --skip="./Utilities" -I .cmake-whitelist.txt`
      
      in CMake whereby the whitelist contained:
      
          ans
          dum
          helpfull
          emmited
          emmitted
          buil
          iff
          isnt
          nto
          ot
          pathes
          substract
          te
          todays
          upto
          whitespaces
      9a1d5901
  21. 31 Oct, 2017 1 commit
  22. 29 Sep, 2017 1 commit
  23. 11 Sep, 2017 1 commit
    • Brad King's avatar
      SystemTools: Drop SplitProgramFromArgs function · c8cfe4e0
      Brad King authored
      This was used only by CMake's get_filename_components() command, which
      has now been re-implemented independently.  The operation is not
      well-defined (string parsing should not depend on filesystem content),
      so remove it.
      c8cfe4e0
  24. 08 Jun, 2017 1 commit
    • Brad King's avatar
      SystemTools: Remove RemoveEmptyPathElements method · 7e04a3d2
      Brad King authored
      This method was added recently but we've found another solution for its
      intended use case.  Removing empty path elements can corrupt paths that
      depend on a trailing empty component to preserve a trailing slash.
      
      Since this method was meant to complement SplitPath and JoinPath, update
      their documentation to explain how they treat empty components.
      7e04a3d2
  25. 30 May, 2017 1 commit
  26. 17 Apr, 2017 1 commit
    • 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
  27. 31 Mar, 2017 1 commit
  28. 29 Mar, 2017 1 commit