1. 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
  2. 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
  3. 27 Oct, 2015 1 commit
  4. 24 Oct, 2015 1 commit
  5. 20 Oct, 2015 3 commits
  6. 16 Oct, 2015 1 commit
  7. 14 Oct, 2015 4 commits
  8. 12 Oct, 2015 2 commits
  9. 10 Oct, 2015 1 commit
  10. 26 Aug, 2015 4 commits
  11. 01 Jul, 2015 1 commit
  12. 04 May, 2015 1 commit
  13. 03 May, 2015 1 commit
  14. 15 Apr, 2015 1 commit
  15. 27 Mar, 2015 1 commit
    • Brad King's avatar
      Allow add_dependencies() on INTERFACE libraries (#15414) · ac14cbf0
      Brad King authored
      Revert commit v3.0.0-rc1~175^2~20 (add_dependencies: Disallow use with
      INTERFACE_LIBRARY, 2013-12-25).  Teach our dependency analysis to
      transitively follow INTERFACE target utility dependencies as was done or
      IMPORTED targets in commit v2.8.6~127^2~1 (Allow add_dependencies() on
      imported targets, 2010-11-19).  Extend the InterfaceLibrary test with a
      case to cover header generation for a header-only INTERFACE library via
      a custom target.
      ac14cbf0
  16. 11 Jan, 2015 1 commit
  17. 07 Jul, 2014 1 commit
  18. 23 Jun, 2014 4 commits
    • Brad King's avatar
      cmTarget: Lookup targets in LinkInterface and LinkImplementation · d912220e
      Brad King authored
      Instead of storing just the string names in these structures, lookup any
      target associated with each item and store its cmTarget pointer.  Use
      the cmLinkItem class to hold the name and pointer together.  Update
      client sites to use the pre-stored lookup result instead of looking up
      the target name again.
      
      Create a cmTarget::LookupLinkItems helper method to handle the lookup.
      Since lookups are now moving from cmComputeLinkDepends::AddLinkEntries
      to cmTarget::LookupLinkItems, move use of CheckCMP0004 to the latter.
      This drops use of CheckCMP0004 from entries added for _LIB_DEPENDS
      variables by cmComputeLinkDepends::AddVarLinkEntries, but I do not
      think that use was intentional originally anyway.
      d912220e
    • Brad King's avatar
      cmTarget: Add GetUtilityItems to get target ordering dependencies · 097be413
      Brad King authored
      Add a method like GetUtilities but that provides the target names
      already looked up and resolved to cmTarget pointers internally.  Update
      call site in cmComputeTargetDepends::AddTargetDepend to use the
      already-found target instead of looking it up again.
      097be413
    • Brad King's avatar
      cmTarget: Remove 'head' argument from GetLinkImplementation · 0dc9e88d
      Brad King authored
      Many of the 'head' arguments added by commit v2.8.11~289^2~1 (Make
      linking APIs aware of 'head' target, 2013-01-04) turned out not to be
      needed.  The "link implementation" of a target never needs to be
      computed with anything but itself as the 'head' target (except for
      CMP0022 OLD behavior because then it is the link interface).
      
      Remove the unused 'head' target paths.  Add "internal" versions of
      cmTarget::GetDirectLinkLibraries and GetLinkImplementationLibraries
      to support the CMP0022 OLD behavior without otherwise exposing the
      'head' target option of these methods.
      0dc9e88d
    • Brad King's avatar
      cmComputeTargetDepends: Remove unused 'linking' argument · 7b859389
      Brad King authored
      The AddInterfaceDepends method is never called with a non-true value for
      its 'linking' argument.  Drop it.
      7b859389
  19. 05 Jun, 2014 1 commit
  20. 02 Apr, 2014 3 commits
    • Stephen Kelly's avatar
      cmTarget: Make the source files depend on the config. · e6971df6
      Stephen Kelly authored
      Disallow the use of config-specific source files with
      the Visual Studio and Xcode generators. They don't have
      any way to represent the condition currently.
      
      Use the same common-config API in cmQtAutoGenerators. While
      it accepts config-specific files, it doesn't have to support
      multiple configurations yet.
      
      Loop over the configs in cmTargetTraceDependencies
      and cmGlobalGenerator::WriteSummary and consume all source
      files.
      
      Loop over the configs in cmComputeTargetDepends and compute the
      object library dependencies for each config.
      e6971df6
    • Stephen Kelly's avatar
      cmComputeTargetDepends: Use valid config to compute target depends. · 869328aa
      Stephen Kelly authored
      If CMAKE_BUILD_TYPE is set, and user code contains:
      
       target_link_libraries(myexe prefix_$<$<CONFIG:Debug>:debug>)
      
      then the computation with an empty config was computing a target-level
      dependency on a target or library called prefix_, and a dependency
      on a target or library called prefix_debug (as expected).
      
      The existing logic skips 'prefix_' because it is not a known target,
      and defers to the link-dependencies logic to find the library. The
      link-dependencies logic does not incorrectly handle the config as
      cmComputeTargetDepends did, and so did not encounter 'prefix_'
      during its computation. This likely had no effect on the generated
      buildsystem.
      869328aa
    • Stephen Kelly's avatar
      cmComputeTargetDepends: Track object library depends. · c355d108
      Stephen Kelly authored
      Relieve cmGeneratorTarget of that responsibility.
      c355d108
  21. 31 Mar, 2014 1 commit
  22. 11 Mar, 2014 1 commit
    • Stephen Kelly's avatar
      Remove some c_str() calls. · 21c573f6
      Stephen Kelly authored
      Use the clang RemoveCStrCalls tool to automatically migrate the
      code. This was only run on linux, so does not have any positive or
      negative effect on other platforms.
      21c573f6
  23. 08 Mar, 2014 3 commits
  24. 06 Mar, 2014 1 commit