1. 11 Oct, 2016 1 commit
    • Brad King's avatar
      cmake-gui: Fix "extra" generator entries in drop-down list · bf86012a
      Brad King authored
      Refactoring in commit v3.7.0-rc1~291^2~1 (Refactor extra generator
      registration to use factories, 2016-07-20) accidentally switched
      the order of the "extra - base" generator names to "base - extra".
      Switch it back.  While this could affect all callers of the
      `GetRegisteredGenerators` method, only cmake-gui actually used this
      particular field.
      
      Closes: #16359
      bf86012a
  2. 10 Oct, 2016 3 commits
    • Stephen Kelly's avatar
      cmLinkLineComputer: Move FrameworkPath computation from cmLocalGenerator · f03d446e
      Stephen Kelly authored
      Add UseWatcomQuote state, and remove corresponding method parameters.
      f03d446e
    • Stephen Kelly's avatar
      cmLinkLineComputer: Move ComputeLinkLibs from cmLocalGenerator · 0c978063
      Stephen Kelly authored
      Add a cmOutputConverter to the cmLinkLineComputer and factory methods to
      facilitate shell escapes.
      
      Add state to the cmLinkLineComputer to record whether outputting for
      response files or for watcom, to satisfy the cmOutputConverter API.
      These are constant for the lifetime of the cmLinkLineComputer, even when
      its functionality is extended in the future.  This also keeps the
      signatures of cmLinkLineComputer relatively simple.
      
      Pass the cmComputeLinkInformation as a method parameter so that
      cmLinkLineComputer is free from target-specific state.  An instance
      should be usable for all targets in a directory.
      0c978063
    • Stephen Kelly's avatar
      cmLinkLineComputer: Extract from cmLocalGenerator · 5b361fdd
      Stephen Kelly authored
      CMake has several classes which have too many responsibilities.
      cmLocalGenerator is one of them.  Start to extract the link line
      computation.  Create generator-specific implementations of the interface
      to account for generator-specific behavior.
      
      Unfortunately MSVC60 has different behavior to everything else and CMake
      still generates makefiles for it.  Isolate it with MSVC60-specific
      names.
      5b361fdd
  3. 07 Oct, 2016 1 commit
  4. 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 lin...
      86578ecc
  5. 19 Sep, 2016 1 commit
  6. 16 Sep, 2016 1 commit
    • Brad King's avatar
      cmake: Fix --find-package mode link line output · a098ca0d
      Brad King authored
      Refactoring in commit v2.8.10~58^2~2 (Ninja: move -LIBPATH behind -link
      option, 2012-09-26) added arguments to cmLocalGenerator::GetTargetFlags
      and updated the call sites.  However, in the cmake::FindPackage and
      cmLocalGenerator::AddBuildTargetRule call sites it added the new
      arguments in the wrong order.  The latter was never used and has been
      removed.  The former remains buggy and prints out compiler flags instead
      of the link framework/library search paths.  Fix its argument order.
      a098ca0d
  7. 14 Sep, 2016 1 commit
  8. 12 Sep, 2016 2 commits
  9. 07 Sep, 2016 1 commit
    • Brad King's avatar
      VS15: Add Visual Studio 15 generator · bdc679a8
      Brad King authored
      Call the generator "Visual Studio 15" without any year because the
      preview version of VS 15 does not provide a year in the product name.
      
      Copy cmGlobalVisualStudio14Generator to cmGlobalVisualStudio15Generator
      and update version numbers accordingly.  Add the VS15 enumeration value.
      Note that we do not need to add a MSVC15 variable or v150 toolset
      because Visual Studio 15 comes with an updated version of the v140
      toolset and remains ABI-compatible.
      
      Teach tests VSExternalInclude, RunCMake.GeneratorPlatform, and
      RunCMake.GeneratorToolset to treat VS 15 as they do VS 10-14.
      
      Closes: #16143
      bdc679a8
  10. 03 Sep, 2016 1 commit
  11. 25 Aug, 2016 1 commit
    • Stephen Kelly's avatar
      cmMessenger: Extract from cmake class · 421012a3
      Stephen Kelly authored and Brad King's avatar Brad King committed
      This way messages can be issued independent of the cmake instance.
      
      It is now possible to make DisplayMessage a virtual interface and
      override it to handle messages in the cmake-gui or future IDE
      interaction interfaces.
      421012a3
  12. 18 Aug, 2016 1 commit
  13. 16 Aug, 2016 3 commits
  14. 03 Aug, 2016 2 commits
  15. 18 Jul, 2016 1 commit
  16. 14 Jul, 2016 1 commit
  17. 29 Jun, 2016 1 commit
    • Brad King's avatar
      Avoid using KWSys auto_ptr by adopting it ourselves · b5ec5b09
      Brad King authored
      Replace use of cmsys::auto_ptr with a CM_AUTO_PTR macro that maps to
      our own implementation adopted from the KWSys auto_ptr implementation.
      Later we may be able to map CM_AUTO_PTR to std::auto_ptr on compilers
      that do not warn about it.
      
      Automate the client site conversions:
      
          git grep -l auto_ptr -- Source/ | grep -v Source/kwsys/ | xargs sed -i \
            's|cmsys::auto_ptr|CM_AUTO_PTR|;s|cmsys/auto_ptr.hxx|cm_auto_ptr.hxx|'
      b5ec5b09
  18. 28 Jun, 2016 1 commit
  19. 17 Jun, 2016 1 commit
    • Alex Turbov's avatar
      cmake: Add an option to control what files needs to be traced · e63151ff
      Alex Turbov authored and Brad King's avatar Brad King committed
      Even in relatively small projects using `--trace` (and `--trace-expand`)
      may produce a lot of output.  When developing a custom module usually
      one is interested in output of only a few particular modules.
      
      Add a `--trace-source=<file>` option to enable tracing only a subset of
      source files.  The final output would be only from requested modules,
      ignoring anything else not matched to given filename(s).
      e63151ff
  20. 14 Jun, 2016 1 commit
  21. 12 Jun, 2016 3 commits
  22. 08 Jun, 2016 4 commits
  23. 26 May, 2016 1 commit
    • Daniel Pfeifer's avatar
      Remove unnecessary local copies. · 27ead963
      Daniel Pfeifer authored
      Use clang-tidy's performance-unnecessary-copy-initialization checker.
      After applying the fix-its (which turns the copies into const&), revise
      the changes and see whether the copies can be removed entirely by using
      the original instead.
      27ead963
  24. 16 May, 2016 1 commit
    • Kitware Robot's avatar
      Revise C++ coding style using clang-format · d9fd2f54
      Kitware Robot authored and Brad King's avatar Brad King committed
      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
  25. 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
  26. 06 May, 2016 2 commits
    • Brad King's avatar
      Help clang-format wrap after braces on long initializer lists · afca3735
      Brad King authored
      Add a long comment inside a few braced initializer lists in order to
      convince clang-format to break after the opening brace and format the
      list without indenting every value past the opening brace.
      afca3735
    • Brad King's avatar
      Isolate formatted streaming blocks with clang-format off/on · 64b55203
      Brad King authored
      The clang-format tool can do a good job formatting most code, but
      well-organized streaming blocks are best left manually formatted.
      
      Find blocks of the form
      
          os <<
            "...\n"
            "...\n"
            ;
      
      using the command
      
          $ git ls-files -z -- Source |
            egrep -v -z '^Source/kwsys/' |
            xargs -0 pcregrep -M --color=always -B 1 -A 1 -n \
              '<<[^\n]*\n(^ *("[^\n]*("|<<|;)$|;)\n){2,}'
      
      Find blocks of the form
      
          os << "...\n"
             << "...\n"
             << "...\n";
      
      using the command
      
          $ git ls-files -z -- Source |
            egrep -v -z '^Source/kwsys/' |
            xargs -0 pcregrep -M --color=always -B 1 -A 1 -n \
              '<<[^\n]*\n(^ *<<[^\n]*(\\n"|<<|;)$\n){2,}'
      
      Surround such blocks with the pair
      
          /* clang-format off */
          ...
          /* clang-format on */
      
      in order to protect them from update by clang-format.  Use the C-style
      `/*...*/` comments instead of C++-style `//...` comments in order to
      prevent them from ever being swallowed by re-formatting of surrounding
      comments.
      64b55203
  27. 03 May, 2016 1 commit
  28. 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