Skip to content
Snippets Groups Projects
  1. Jun 02, 2020
  2. Sep 18, 2019
  3. Sep 10, 2019
    • wahikihiki's avatar
      clang-tidy: modernize-use-auto · d25a5a7e
      wahikihiki authored
      Set the MinTypeNameLength option to an impossibly high value in order
      to limit the diagnostics to iterators.  Leave new expressions and cast
      expressions for later.
      d25a5a7e
  4. Aug 23, 2019
  5. Aug 07, 2019
  6. Jan 31, 2018
    • 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
  7. Jan 23, 2018
  8. Oct 30, 2017
  9. Oct 26, 2017
  10. Oct 24, 2017
    • Deniz Bahadir's avatar
      Defer check for sources within a target until generation. · 4e7f6738
      Deniz Bahadir authored and Brad King's avatar Brad King committed
      The `add_library` and `add_executable` commands can now be called with
      no source-files and won't generate a warning or error message, as long
      as source-files will be added later via the `target_sources` command.
      If during the generation step still no sources are associated with
      targets created by such calls a useful error message will be generated
      and generation fails.
      
      Targets of type `INTERFACE_LIBRARY`, `UTILITY` or `GLOBAL_TARGET` are
      excluded from this check because we do not need sources for these target
      types during generation.
      
      Fixes: #16872
      4e7f6738
  11. May 26, 2017
  12. Dec 12, 2016
  13. Oct 26, 2016
  14. Oct 21, 2016
  15. Oct 19, 2016
  16. Sep 27, 2016
    • 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
  17. May 16, 2016
    • 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
  18. May 06, 2016
    • 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
  19. Oct 27, 2015
  20. Oct 14, 2015
    • Stephen Kelly's avatar
      cmState: Move TargetType enum from cmTarget. · eac15298
      Stephen Kelly authored
      Mostly automated:
      
       values=( "EXECUTABLE" "STATIC_LIBRARY" "SHARED_LIBRARY" "MODULE_LIBRARY" "OBJECT_LIBRARY" "UTILITY" "GLOBAL_TARGET" "INTERFACE_LIBRARY" "UNKNOWN_LIBRARY" "TargetType")
       for i in "${values[@]}"; do     git grep -l cmTarget::$i | xargs sed -i "s|cmTarget::$i|cmState::$i|g"; done
      eac15298
  21. May 04, 2015
  22. Jan 11, 2015
  23. Mar 31, 2014
  24. Mar 11, 2014
    • 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
  25. Jan 16, 2014
    • Rolf Eike Beer's avatar
      cmMakefile: make some methods take const std::string& instead of const char* · c768e398
      Rolf Eike Beer authored and Brad King's avatar Brad King committed
      Most callers already have a std::string, on which they called c_str() to pass it
      into these methods, which internally converted it back to std::string. Pass a
      std::string directly to these methods now, avoiding all these conversions.
      Those methods that only pass in a const char* will get the conversion to
      std::string now only once.
      c768e398
  26. Nov 19, 2013
  27. Nov 07, 2013
  28. Aug 02, 2013
    • Stephen Kelly's avatar
      Add the ALIAS target concept for libraries and executables. · 370bf554
      Stephen Kelly authored
      * The ALIAS name must match a validity regex.
      * Executables and libraries may be aliased.
      * An ALIAS acts immutable. It can not be used as the lhs
        of target_link_libraries or other commands.
      * An ALIAS can be used with add_custom_command, add_custom_target,
        and add_test in the same way regular targets can.
      * The target of an ALIAS can be retrieved with the ALIASED_TARGET
        target property.
      * An ALIAS does not appear in the generated buildsystem. It
        is kept separate from cmMakefile::Targets for that reason.
      * A target may have multiple aliases.
      * An ALIAS target may not itself have an alias.
      * An IMPORTED target may not have an alias.
      * An ALIAS may not be exported or imported.
      370bf554
  29. Jan 25, 2012
    • Brad King's avatar
      Optionally allow IMPORTED targets to be globally visible · ca39c5cd
      Brad King authored
      Consider the case motivating commit e01cce28 (Allow add_dependencies()
      on imported targets, 2010-11-19).  An imported target references a file
      generated at build time by a custom target on which it depends.  Had the
      file been built directly using add_library or add_executable its target
      name would have been visible globally.  Therefore the imported target
      representing the file should be globally visible also.
      
      Teach the IMPORTED signature of add_(executable|library) to accept a new
      "GLOBAL" option to make the imported target visible globally.
      ca39c5cd
  30. Aug 15, 2011
  31. Aug 14, 2011
  32. Oct 01, 2009
  33. Sep 28, 2009
    • Brad King's avatar
      Convert CMake to OSI-approved BSD License · 96afb120
      Brad King authored
      This converts the CMake license to a pure 3-clause OSI-approved BSD
      License.  We drop the previous license clause requiring modified
      versions to be plainly marked.  We also update the CMake copyright to
      cover the full development time range.
      96afb120
  34. Feb 11, 2008
  35. Jan 28, 2008
    • Brad King's avatar
      ENH: Updated exporting and importing of targets to support libraries and configurations. · 5594ad48
      Brad King authored
        - Created cmExportFileGenerator hierarchy to implement export file generation
        - Installed exports use per-config import files loaded by a central one.
        - Include soname of shared libraries in import information
        - Renamed PREFIX to NAMESPACE in INSTALL(EXPORT) and EXPORT() commands
        - Move addition of CMAKE_INSTALL_PREFIX to destinations to install generators
        - Import files compute the installation prefix relative to their location when loaded
        - Add mapping of importer configurations to importee configurations
        - Rename IMPORT targets to IMPORTED targets to distinguish from windows import libraries
        - Scope IMPORTED targets within directories to isolate them
        - Place all properties created by import files in the IMPORTED namespace
        - Document INSTALL(EXPORT) and EXPORT() commands.
        - Document IMPORTED signature of add_executable and add_library
        - Enable finding of imported targets in cmComputeLinkDepends
      5594ad48
  36. Jan 23, 2008
  37. May 22, 2007
    • Alexander Neundorf's avatar
      · b37cc607
      Alexander Neundorf authored
      COMP: compile fix and remove warning
      
      Alex
      b37cc607
    • Alexander Neundorf's avatar
      · 4878c009
      Alexander Neundorf authored
      ENH: add the IMPORT keyword to ADD_EXECUTABLE(), which generates an
      "imported" executable target. This can then be used e.g. with
      ADD_CUSTOM_COMMAND() to generate stuff. It adds a second container for
      "imported" targets, and FindTarget() now takes an additional argument bool
      useImportedTargets to specify whether you also want to search in the
      imported targets or only in the "normal" targets.
      
      Alex
      4878c009
Loading