1. 04 Nov, 2016 3 commits
    • Kitware Robot's avatar
      Revise C++ coding style using clang-format · 6c973b46
      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 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
    • 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
    • Brad King's avatar
      Sort includes to stabilize include order w.r.t. clang-format · 15e90a3c
      Brad King authored
      The clang-format tool sorts `#include` lines within contiguous blocks.
      Separate blocks with blank lines and sort the include lines within them
      so that clang-format does not re-order anything.
      Change-Id: I96d6828f470b9a234464972172d46afab322487c
  2. 19 Jul, 2016 1 commit
    • Dāvis Mosāns's avatar
      FStream: Add MinGW support · 9d1dbd95
      Dāvis Mosāns authored
      std::basic_filebuf::open(const wchar_t *) isn't part of C++ standard
      and it's only present for MSVC but it isn't present in libstdc++ (MinGW)
      so we implement this functionality using GNU libstdc++ stdio_filebuf
      extension and _wfopen function.
      Change-Id: I7df7a1b22ba272db23c8d962cb66ec71a278ef06
  3. 14 Dec, 2015 1 commit
  4. 04 Dec, 2015 1 commit
    • Brad King's avatar
      FundamentalType: Drop KWSYS_CAN_CONVERT_UI64_TO_DOUBLE macro · 452b10d5
      Brad King authored
      This was used only for an old VS 6 version that did not support
      conversion of `unsigned __int64` to `double`.  Support for this compiler
      has been dropped from KWSys clients that used the macro.
      Change-Id: Ia61beaa0251fc2b6d77632af3e610c08f64d11eb
  5. 06 Oct, 2015 2 commits
  6. 28 Aug, 2015 8 commits
  7. 03 Jun, 2015 1 commit
  8. 09 Jan, 2015 1 commit
    • Stephen Kelly's avatar
      Workaround SolarisStudio bug with libstdc++. · d30c9b03
      Stephen Kelly authored
      Using iostream and cxxabi.h together causes a compile failure
       .../CC-gcc/include/c++/4.8.2/cxxabi.h", line 131: Error: Only one of a
       set of overloaded functions can be extern "C".
      See https://community.oracle.com/thread/3644901 for details.
      This only happens if the iostream include is before the cxxabi include.
      The available solutions are: re-order the includes in
      SystemInformation.cxx, skip the test for KWSYS_CXX_HAS_CXXABI, or cause
      it to fail by adding the include.  Do the latter for now.
      Change-Id: Ia1a6a6fca12eb9a42f4a4be5252f22fb6e74a318
  9. 31 Oct, 2013 1 commit
  10. 02 Aug, 2013 1 commit
    • Burlen Loring's avatar
      SystemInformation : Better stack trace · 1d882d4c
      Burlen Loring authored
      Add supprt for C++ name demangling during call stack
      introspection. This will be enabled at compile time
      if the required system libraries,header files, and
      compiler features are detected. Add a method so that
      the stack trace may be obtained on demand not just
      from within the stack trace signal handler.
      Change-Id: Ie829f4b24ab331e39b97f54e63564df70f129b7e
  11. 31 May, 2013 1 commit
    • Brad King's avatar
      SystemTools: Touch with better than 1s resolution if possible · dccf7725
      Brad King authored
      On Windows use CreateFile (with FILE_FLAG_BACKUP_SEMANTICS so it works
      for directories), GetSystemTimeAsFileTime, and SetFileTime to touch.  On
      other platforms prefer utimensat, then utimes, then utime.
      Change-Id: Ie85fe3766661803e66f39975a147cd6f7320ea59
      CMake-Issue: 14020
  12. 12 Jan, 2013 1 commit
  13. 09 Oct, 2012 1 commit
    • Burlen Loring's avatar
      SystemInformation: support for resource limits · 6072e63b
      Burlen Loring authored
      Add methods to report host memory total, host memory available,
      process memory available, host memory used, and process memory
      used. In this context memory is unavailable if there are resource
      limits in place that would prevent its use. Such resource limits
      assumed to be applied on a per host basis both to cooperatively
      operating process groups, such as mpi programms running in parallel,
      and to individual processes. When reporting host memory available
      consult an application specified environment variable. When reporting
      process memory available consult unix resource rlimits and an
      application specified environment variable. The environmant variables
      provide a means of communicating resource limits that are being
      applied in a non-standard way.
      Change-Id: Ifb3b0fdaab8db0ab87140fa2dcafad3c51e2d874
  14. 02 May, 2012 1 commit
    • Brad King's avatar
      KWSys: Remove dependencies on FundamentalType · 719638e2
      Brad King authored
      The hash_fun.hxx header is configured whether FundamentalType is enabled
      or not and so cannot depend on it.  Run the relevant platform tests
      whether or not FundamentalType is on and configure the result directly
      into hash_fun.  While at it, remove the dependence of SystemInformation
      on FundamentalType too since it needs only information that we now
      always compute.
  15. 26 Apr, 2012 1 commit
    • Brad King's avatar
      KWSys: Fix SystemTools environment memory handling (#13156) · 48aeb751
      Brad King authored
      The SystemTools::PutEnv function tries to provide the "putenv" API
      without leaking memory.  However, the kwsysDeletingCharVector singleton
      frees memory that may still be referenced by the environment table,
      having been placed there by putenv.  If any static destruction or
      processing by an external tool happens after the singleton is destroyed
      and accesses the environment it will read invalid memory.
      Replace use of putenv with setenv/unsetenv when available.  The latter
      manage internal copies of the values passed instead of referencing the
      original memory.  When setenv/unsetenv are not available use putenv with
      a singleton that removes its values from the environment before freeing
      their memory.  This requires an "unputenv" implementation.  On at least
      some platforms it must be written in terms of "putenv" because other
      APIs are not available and direct modification of the "environ" global
      is not safe (e.g. on Windows there is interaction with "wenviron").
      Fortunately either putenv("A=") or putenv("A") will remove "A" from the
      environment on these platforms.  On other platforms fall back to direct
      manipulation of "environ".
      Also add UnPutEnv to the API and add a test for the behavior of both.
  16. 20 Nov, 2009 1 commit
    • Brad King's avatar
      Check for 'long long' without computing size · 9782e865
      Brad King authored
      In KWSys IOStream we need to detect whether 'long long' exists but we do
      not need its size.  We avoid using CHECK_TYPE_SIZE because it does not
      work for types whose size varies across architectuers in Mac OS X
      universal binaries.  See issue #9913.
  17. 28 Sep, 2009 1 commit
    • Brad King's avatar
      Convert KWSys to OSI-approved BSD License · 62db264e
      Brad King authored
      This converts the KWSys license to a pure 3-clause OSI-approved BSD
      License.  We drop the previous license clause requiring modified
      versions to be plainly marked.  We also update the KWSys copyright to
      cover the full development time range.
  18. 31 Aug, 2009 1 commit
    • Brad King's avatar
      Define kwsys_ios_binary macro for std::ios::binary · 9350c584
      Brad King authored
      The 'binary' openmode does not exist on all compilers.  We define macro
      <kwsys>_ios_binary, where <kwsys> is the KWSys namespace, to refer to
      std::ios::binary if it exists and 0 otherwise.  Sample usage:
        kwsys_ios::ifstream fin(fn, kwsys_ios::ios::in | kwsys_ios_binary);
  19. 27 Jul, 2009 1 commit
  20. 31 Jan, 2008 1 commit
  21. 20 Apr, 2007 1 commit
  22. 04 Oct, 2006 1 commit
  23. 27 Aug, 2006 1 commit
  24. 25 Aug, 2006 2 commits
  25. 17 Jan, 2006 1 commit
  26. 03 Oct, 2005 1 commit
  27. 26 Jul, 2005 1 commit
  28. 03 May, 2005 1 commit
  29. 21 Apr, 2005 1 commit