1. 10 Jan, 2019 3 commits
  2. 25 Oct, 2018 1 commit
  3. 01 Jun, 2018 1 commit
    • Kitware Robot's avatar
      Revise C++ coding style using clang-format-6.0 · d7204e64
      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.
      d7204e64
  4. 24 Apr, 2018 1 commit
  5. 23 Apr, 2018 1 commit
  6. 23 Feb, 2018 1 commit
    • Robert Dailey's avatar
      VS: Support C# project references · 076a356c
      Robert Dailey authored
      When specifying a pure C# target in the `target_link_libraries()` call to
      another C++ target, a `<ProjectReference>` was setup for it (we wanted this)
      but also a corresponding `.lib` was added under `<AdditionalDependencies>`
      (we didn't want this).
      
      This change introduces a check that prevents `.lib` linker options from
      being used when the corresponding target for that library is a C# target.
      
      Fixes: #17678
      076a356c
  7. 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
  8. 21 Dec, 2017 1 commit
  9. 20 Nov, 2017 1 commit
  10. 18 Oct, 2017 1 commit
    • Brad King's avatar
      VS,Xcode: Add CMakeLists.txt sources without mutating targets · 344d149a
      Brad King authored
      Rather than injecting `CMakeLists.txt` files into each target's
      `SOURCES`, teach the generators to add them during generation using
      dedicated code.  This avoids mutating the original targets, and avoids
      polluting `$<TARGET_PROPERTY:foo,SOURCES>` with generator-specific
      content.
      
      This also avoids listing the `CMakeLists.txt` sources in the results of
      `CMAKE_DEBUG_TARGET_PROPERTIES==SOURCES` so the `RunCMake.TargetSources`
      test no longer needs a separate case for IDEs.
      344d149a
  11. 13 Oct, 2017 1 commit
  12. 21 Sep, 2017 1 commit
  13. 05 Sep, 2017 1 commit
    • Michael Stürmer's avatar
      VS: Do not reference output assemblies if not possible for CSharp target · 7e57e6ae
      Michael Stürmer authored
      Since commit v3.9.0-rc4~4^2 (Vs: allow CSharp targets to be linked to
      CXX targets, 2017-06-20) CSharp targets get `ProjectReference` entries
      to their dependencies.  This causes VS to also reference the
      dependency's output assembly by default, which is incorrect for
      non-managed targets.
      
      Fix this by setting `ReferenceOutputAssembly` to `false` for targets
      that can't provide output assemblies.  Unmanaged C++ targets (shared
      libs & executables) can still be referenced and a warning will be shown
      in the IDE but the build will not break anymore.
      
      Fixes: #17172
      7e57e6ae
  14. 30 Aug, 2017 1 commit
  15. 18 Aug, 2017 1 commit
  16. 11 Apr, 2017 2 commits
    • 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
    • Brad King's avatar
      VS: Simplify use of object libraries in WINDOWS_EXPORT_ALL_SYMBOLS · 10772c51
      Brad King authored
      Object library files are already included by `GetExternalObjects`
      so we don't need to call `UseObjectLibraries` to get them.
      10772c51
  17. 04 Apr, 2017 1 commit
  18. 30 Mar, 2017 1 commit
  19. 21 Mar, 2017 2 commits
  20. 14 Mar, 2017 1 commit
    • Daniel Pfeifer's avatar
      fix include order of windows.h · 4b49c9a2
      Daniel Pfeifer authored
      Comments that indicate a special include order is necessary because
      GetCurrentDirectory might get redefined are outdated.  Remove those
      outdated comments and use the normal ordering of includes.
      4b49c9a2
  21. 09 Mar, 2017 1 commit
    • Brad King's avatar
      Refactor WINDOWS_EXPORT_ALL_SYMBOLS implementation · f36eaf6a
      Brad King authored
      Use `cmGeneratorTarget::ModuleDefinitionInfo` to combine the
      implementation of `WINDOWS_EXPORT_ALL_SYMBOLS` with that of using a
      `.def` file as a source.  Only one of these could be used within a
      single target before anyway.
      f36eaf6a
  22. 07 Mar, 2017 1 commit
  23. 30 Jan, 2017 1 commit
  24. 28 Nov, 2016 1 commit
  25. 20 Oct, 2016 1 commit
  26. 19 Oct, 2016 3 commits
  27. 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
  28. 21 Jul, 2016 1 commit
  29. 24 May, 2016 1 commit
    • Daniel Pfeifer's avatar
      Use std::replace for replacing chars in strings. · 5cec953e
      Daniel Pfeifer authored
      Find uses of `cmSystemTools::ReplaceString` where both `replace` and
      `with` are string literals with a size of one.
      
      Automate with:
      
      git grep -l ReplaceString | xargs sed -i "s|cmSystemTools::ReplaceString(\([^,]*\), \"\(.\)\", \"\(.\)\");|std::replace(\1.begin(), \1.end(), '\2', '\3');|g"
      git grep -l ReplaceString | xargs sed -i "s|cmSystemTools::ReplaceString(\([^,]*\), \"\(.\)\", \"\\\\\\\\\");|std::replace(\1.begin(), \1.end(), '\2', '\\\\\\\\');|g"
      git grep -l ReplaceString | xargs sed -i "s|cmSystemTools::ReplaceString(\([^,]*\), \"\\\\\\\\\", \"\(.\)\");|std::replace(\1.begin(), \1.end(), '\\\\\\\\', '\2');|g"
      5cec953e
  30. 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
  31. 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
  32. 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
  33. 26 Apr, 2016 1 commit
  34. 23 Mar, 2016 1 commit