1. 08 Nov, 2016 1 commit
  2. 28 Oct, 2016 1 commit
  3. 20 Oct, 2016 1 commit
  4. 19 Oct, 2016 3 commits
  5. 15 Oct, 2016 4 commits
  6. 13 Oct, 2016 1 commit
    • Ben Boeckel's avatar
      Ninja: Fix RC language depfile generation with cmcldeps · 9977899d
      Ben Boeckel authored
      In commit v3.7.0-rc1~275^2 (Ninja: Use full path for all source files,
      2016-08-05), the source path was changed to use an absolute path.
      Inside of `cmcldeps` for `.rc` file compilation, it uses a separate
      argument for the path to the source file.  This ended up causing
      `cmcldeps` to transform the following call:
      
          cmcldeps.exe RC source.rc ... C:/full/path/to/source.rc
      
      into:
      
          ... C:/full/path/to//Tc source.rc
      
      which is invalid.  Update the source filename to use the full path to
      the source file so that the path is replaced properly.
      9977899d
  7. 27 Sep, 2016 2 commits
    • 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
    • Nils Gladitz's avatar
      Ninja: Add source location as include directory for preprocessed files · 144cc6f1
      Nils Gladitz authored
      Fortran INCLUDE statements are not handled by the preprocessor.
      
      Since the location of the preprocessed file is distinct from the
      original source file explicitly add the source file's directory
      as an include path in the actual compile step (not the preprocessing step)
      so INCLUDE can find it.
      
      Closes: #16332
      144cc6f1
  8. 22 Sep, 2016 2 commits
    • Brad King's avatar
      Ninja: Add dyndep rules for Fortran module dependencies · 59aae292
      Brad King authored
      Teach the Ninja generator to add dyndep rules and bindings as described
      in the design comment in `Source/cmGlobalNinjaGenerator.cxx`.
      59aae292
    • Brad King's avatar
      Ninja: Add explicit preprocessing step for Fortran · 39ebfc79
      Brad King authored
      All Fortran sources need to be preprocessed before any source may be
      compiled so that module dependencies can be (later) extracted.  Factor
      out an explicit preprocessing step preceding compilation.  Use Ninja
      depfile dependencies on the preprocessing step and then compile the
      already-preprocessed source with a separate build statement that depends
      explicitly only on the preprocessor output.  Later we will insert
      dynamic discovery of module dependencies between these steps.
      39ebfc79
  9. 20 Sep, 2016 1 commit
    • Brad King's avatar
      cmGlobalNinjaGenerator: Teach WriteBuild about implicit outputs · 144a24dc
      Brad King authored
      Ninja 1.7 introduced support for implicit outputs on build statements.
      Teach WriteBuild to generate the corresponding syntax.  Leave it up to
      callers to decide whether implicit outputs are supported by the Ninja
      version in use.  For now simply update all call sites to pass an empty
      list of implicit outputs.
      144a24dc
  10. 23 Aug, 2016 1 commit
  11. 09 Aug, 2016 1 commit
    • Brad King's avatar
      Ninja: Add `$subdir/{test,install,package}` targets · 02789894
      Brad King authored
      With the Makefile generator one can use `cd $subdir; make install` to build and
      install targets associated with a given subdirectory.  This is not possible to
      do with the Ninja generator since there is only one `build.ninja` file at the
      top of the build tree.  However, we can approximate it by allowing one to run
      `ninja $subdir/install` at the top of the tree to build the targets in the
      corresponding subdirectory and install them.
      
      This also makes sense for `test`, `package`, and other GLOBAL_TARGET targets.
      It was already done for `all` by commit v3.6.0-rc1~240^2~2 (Ninja: Add
      `$subdir/all` targets, 2016-03-11).
      02789894
  12. 08 Aug, 2016 1 commit
  13. 18 Jul, 2016 1 commit
  14. 28 Jun, 2016 1 commit
  15. 27 Jun, 2016 1 commit
    • Ben Boeckel's avatar
      ninja, rc: ignore CMAKE_NINJA_FORCE_RESPONSE_FILE for RC files · 15b3f6f0
      Ben Boeckel authored
      In commit v3.6.0-rc1~174^2 (Ninja: Honor CMAKE_NINJA_FORCE_RESPONSE_FILE
      for compile rules, 2016-04-06), Ninja learned to look for
      `CMAKE_NINJA_FORCE_RESPONSE_FILE` in the current scope or the
      environment in order to force response file usage for all compilation
      rules.
      
      However, on Windows, the RC compiler goes through cmcldeps which does a
      `replace(output, output + ".dep.obj")` on the command line. However,
      with a response file (which we name `output + ".rsp"`), the response
      file path is replaced instead causing the compiler to (correctly)
      complain that the response file `output + ".dep.obj.rsp"` does not
      exist.
      
      What needs to happen is for cmcldeps to look through the response file,
      replace *its* contents and place it in the `output + ".dep.obj.rsp"`
      file.
      
      Also add a test which actually compiles an RC file into a library and
      executable for all generators on Windows and additionally test
      `CMAKE_NINJA_FORCE_RESPONSE_FILE` for Ninja generators.
      
      Fixes #16167.
      15b3f6f0
  16. 23 Jun, 2016 1 commit
  17. 17 Jun, 2016 1 commit
  18. 10 Jun, 2016 1 commit
  19. 02 Jun, 2016 1 commit
    • Daniel Pfeifer's avatar
      Simplify boolean expressions · 7f6b8d33
      Daniel Pfeifer authored
      Use clang-tidy's readability-simplify-boolean-expr checker.
      After applying the fix-its, revise all changes *very* carefully.
      Be aware of false positives and invalid changes.
      7f6b8d33
  20. 25 May, 2016 1 commit
    • Daniel Pfeifer's avatar
      Use enums defined in cmOutputConverter using their fully qualified name. · 25d1ef64
      Daniel Pfeifer authored
      Mostly automated:
      
      values=("RelativeRoot" "NONE" "FULL" "HOME" "START" "HOME_OUTPUT" "START_OUTPUT"
              "OutputFormat" "UNCHANGED" "MAKERULE" "SHELL" "WATCOMQUOTE" "RESPONSE"
              "FortranFormat" "FortranFormatNone" "FortranFormatFixed" "FortranFormatFree")
      for i in "${values[@]}"; do git grep -l cmLocalGenerator::$i | xargs sed -i "s|cmLocalGenerator::$i|cmOutputConverter::$i|g"; done
      25d1ef64
  21. 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
  22. 17 May, 2016 2 commits
  23. 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
  24. 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
  25. 29 Apr, 2016 2 commits
    • 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
    • Brad King's avatar
      Source: Stabilize include order · 180538c7
      Brad King authored
      Each source file has a logical first include file.  Include it in an
      isolated block so that tools that sort includes do not move them.
      180538c7
  26. 13 Apr, 2016 1 commit
  27. 07 Apr, 2016 2 commits
  28. 04 Nov, 2015 1 commit
    • Tim Grothe's avatar
      Refactor `.def` file lookup · 247c168b
      Tim Grothe authored
      Return a `cmSourceFile const*` from GetModuleDefinitionFile so that
      callers can get more information than just the path to the file.
      247c168b
  29. 24 Oct, 2015 1 commit
  30. 20 Oct, 2015 1 commit