1. 11 Feb, 2019 1 commit
    • Saleem Abdulrasool's avatar
      Create and use `cmGeneratorTarget::Names` · fc8b90af
      Saleem Abdulrasool authored
      Rather than taking a number of out parameters for the various names,
      create a structure that is reused for both `GetLibraryNames` and
      `GetExecutableNames`.  Replace uses according to the new interface.
      fc8b90af
  2. 07 Feb, 2019 1 commit
  3. 30 Jan, 2019 2 commits
    • Harry Mallon's avatar
      install: Fix stripping on macOS · 20291e8e
      Harry Mallon authored
      On macOS the `strip` tool requires special arguments depending on the
      type of binary to be stripped.
      
      Fixes: #11367
      Fixes: #16499
      20291e8e
    • Brad King's avatar
      macOS: Restore compatibility for setting FRAMEWORK after install() · 95210d02
      Brad King authored
      The `FRAMEWORK` target property affects the way the `install()` command
      treats the target and so should be set first.  Our implementation
      assumed that this was always the case and led to an assertion failure.
      Prior to CMake 3.12 this was visible only when using an explicit
      `LIBRARY ... NAMELINK_ONLY` option, but commit 0212d7c7 (install: add
      NAMELINK_COMPONENT argument, 2018-04-18, v3.12.0-rc1~139^2~3) made
      it possible with a simple `LIBRARY DESTINATION`.
      
      Fully supporting out-of-order specification will require non-trivial
      refactoring to defer install generator creation to generate time.
      For now simply restore the old behavior of installing the framework
      to the library destination and warn about the case.
      
      Fixes: #18848
      95210d02
  4. 29 Jan, 2019 1 commit
    • Brad King's avatar
      macOS: Restore compatibility for setting FRAMEWORK after install() · d9dd68cb
      Brad King authored
      The `FRAMEWORK` target property affects the way the `install()` command
      treats the target and so should be set first.  Our implementation
      assumed that this was always the case and led to an assertion failure.
      Prior to CMake 3.12 this was visible only when using an explicit
      `LIBRARY ... NAMELINK_ONLY` option, but commit 0212d7c7 (install: add
      NAMELINK_COMPONENT argument, 2018-04-18, v3.12.0-rc1~139^2~3) made
      it possible with a simple `LIBRARY DESTINATION`.
      
      Fully supporting out-of-order specification will require non-trivial
      refactoring to defer install generator creation to generate time.
      For now simply restore the old behavior of installing the framework
      to the library destination.
      
      Fixes: #18848
      d9dd68cb
  5. 28 Jan, 2019 1 commit
  6. 25 Jan, 2019 1 commit
    • wahikihiki's avatar
      clang-tidy: Use `= default` · 55671b41
      wahikihiki authored
      Suppress some cases in `Source/cmGeneratorExpressionNode.cxx` and
      `Source/cmUVHandlePtr.h` where a few older compilers require a
      user-defined default constructor (with `{}`).
      55671b41
  7. 22 Jan, 2019 1 commit
  8. 21 Jan, 2019 1 commit
  9. 16 Jan, 2019 1 commit
  10. 18 Oct, 2018 1 commit
  11. 18 Jun, 2018 1 commit
  12. 05 Apr, 2018 1 commit
  13. 26 Jan, 2018 1 commit
  14. 22 Dec, 2017 1 commit
  15. 12 Sep, 2017 1 commit
  16. 24 Aug, 2017 1 commit
  17. 21 Apr, 2017 1 commit
  18. 20 Apr, 2017 1 commit
  19. 18 Apr, 2017 2 commits
  20. 12 Dec, 2016 1 commit
  21. 08 Nov, 2016 1 commit
  22. 19 Oct, 2016 2 commits
  23. 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
  24. 03 Sep, 2016 1 commit
  25. 22 Jul, 2016 1 commit
  26. 28 Jun, 2016 1 commit
  27. 14 Jun, 2016 1 commit
  28. 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
  29. 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
  30. 06 May, 2016 1 commit
    • 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
  31. 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
  32. 01 Apr, 2016 1 commit
    • Brad King's avatar
      Rename local target lookup methods to clarify purpose · 0e44f489
      Brad King authored
      Rename methods:
      
      * `cmMakefile::Find{ => LocalNonAlias}Target`
      * `cmLocalGenerator::Find{ => LocalNonAlias}GeneratorTarget`
      
      These names clarify that they are for directory-local target names
      and do not consider alias targets.
      0e44f489
  33. 04 Feb, 2016 1 commit
    • Nick Lewis's avatar
      install: Add EXCLUDE_FROM_ALL option (#14921) · 18ce97c4
      Nick Lewis authored
      Let us take an example of a project that has some tests in a component
      that need to be installed into a dedicated test package.  The user
      expectation is that the result could be achieved by typing the
      following:
      
          make
          make tests
          make install
          DESTDIR=/testpkgs make install-tests
      
      However this results in test components in the default installation as
      well as the testpkg.
      
      Add an EXCLUDE_FROM_ALL option to the install() command to tell it that
      the installation rule should not be included unless its component is
      explicitly specified for installation.
      18ce97c4
  34. 15 Jan, 2016 1 commit
    • Lior Goldberg's avatar
      install: Do not remove compiler-defined RPATH entries · 3ec92267
      Lior Goldberg authored
      Some compilers may add their own RPATH entries when invoking the linker.
      For example, a GCC installation may contain the following definition in
      the specs file:
      
        *link_libgcc:
        %D -rpath <<some specific rpath in which libstdc++.so can be found>>
      
      In this case binaries may contain RPATH entries that CMake did not add.
      When we update the RPATH on installation we must preserve these entries
      even if CMake thinks the INSTALL_RPATH value should be empty.
      
      Fix this by always using file(RPATH_CHANGE) and teach it to behave as
      file(RPATH_REMOVE) if the actual RPATH in the file is empty after
      replacing the build-tree RPATH with the install-tree RPATH.  This will
      preserve any compiler-added RPATH value instead of removing it.
      3ec92267
  35. 10 Dec, 2015 2 commits
    • Ruslan Baratov's avatar
      Xcode: Add support for combined install on iOS · 565d080a
      Ruslan Baratov authored
      This patch solves the problem of installing both: Device and Simulator
      libraries on iOS. Before only one of them was installed.
      
      If the IOS_INSTALL_COMBINED property is set on a target, a
      special install hook will be activated which builds the corresponding
      target and combines both at the install location.
      
      The original patch was contributed by Ruslan Baratov, and polished by
      Gregor Jasny.
      565d080a
    • Gregor Jasny's avatar
      iOS: Fix App Bundle layout · 34f5ef56
      Gregor Jasny authored
      In contrast to OS X the iOS App Bundle layout is a flat structure.
      34f5ef56
  36. 24 Oct, 2015 1 commit