1. 23 Jan, 2019 1 commit
  2. 15 Jan, 2019 1 commit
  3. 21 Nov, 2018 1 commit
  4. 25 Sep, 2018 1 commit
    • Marc Chevrier's avatar
      LINK_DIRECTORIES: Add new properties and commands · a71caab4
      Marc Chevrier authored
      These new capabilities enable to manage link directories
      
      Two new properties:
      * target properties: LINK_DIRECTORIES and INTERFACE_LINK_DIRECTORIES
      
      One new command
      * target_link_directories(): to populate target properties
      
      Fixes: #17215
      a71caab4
  5. 07 Aug, 2018 1 commit
    • Sebastian Holtermann's avatar
      cmGeneratedFileStream: clang-tidy applied to remove redundant ``c_str`` calls · b6802cd5
      Sebastian Holtermann authored
      After changing the ``cmGeneratedFileStream`` methods to accept
      ``std::string const&`` instead of ``const char*`` we don't
      need to call ``std::string::c_str`` anymore when passing
      a ``std::string`` to a ``cmGeneratedFileStream`` method.
      
      This patch removes all redundant ``std::string::c_str``
      calls when passing a string to a ``cmGeneratedFileStream`` method.
      
      It was generated by building CMake with clang-tidy enabled using
      the following options:
      
      -DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy-4.0;-checks=-*,readability-redundant-string-cstr;-fix;-fix-errors
      b6802cd5
  6. 27 Jun, 2018 1 commit
  7. 06 Jun, 2018 1 commit
    • Marc Chevrier's avatar
      LINK_OPTIONS: Add new family of properties · c1f5a44b
      Marc Chevrier authored
      This family enable to manage link flags
      
      Three new properties:
      * directory property: LINK_OPTIONS
      * target properties: LINK_OPTIONS and INTERFACE_LINK_OPTIONS
      
      Two new commands
      * add_link_options(): to populate directory property
      * target_link_options(): to populate target properties
      
      Fixes: #16543
      c1f5a44b
  8. 04 Jun, 2018 1 commit
  9. 16 Mar, 2018 1 commit
    • Wouter Klouwen's avatar
      Export: allow exporting of additional properties · 6db61f07
      Wouter Klouwen authored
      This change introduces an additional property that may be set on a
      target to allow additional properties to be exported. Normally only a
      limited number of properties are exported.
      
      Additional properties may be exported by simply setting the
      `EXPORT_PROPERTIES` property on a target that is exported.
      6db61f07
  10. 28 Feb, 2018 1 commit
    • Brad King's avatar
      install,export: Maybe transform OBJECT libraries to INTERFACE libraries · ea0ce73a
      Brad King authored
      Teach the `install` and `export` commands to support installing and
      exporting `OBJECT` libraries without their object files.  Transform
      them to `INTERFACE` libraries in such cases.
      
      For `install(TARGETS)`, activate this when no destination for the object
      files is specified.  For `export`, activate this only under Xcode with
      multiple architectures when we have no well-defined object file
      locations to give to clients.
      ea0ce73a
  11. 31 Jan, 2018 1 commit
    • 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
  12. 26 Jan, 2018 1 commit
  13. 12 Sep, 2017 1 commit
  14. 27 Aug, 2017 1 commit
  15. 01 Jun, 2017 1 commit
  16. 18 Apr, 2017 1 commit
  17. 07 Mar, 2017 1 commit
    • Steven Newbury's avatar
      Add support for x32-abi · 462cf254
      Steven Newbury authored
      Detect x32-abi through CMakeCompilerABI infrastruture and use this
      information at runtime to determine the correct library paths with
      `FIND_LIBRARY_USE_LIBX32_PATHS`.
      
      Fixes: #15994
      462cf254
  18. 19 Oct, 2016 2 commits
  19. 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
  20. 08 Sep, 2016 1 commit
  21. 06 Sep, 2016 1 commit
    • Ben Keller's avatar
      install: Fix computed import prefix in export files when it is "/" · 290e4ce8
      Ben Keller authored
      When exporting from a project (with install(EXPORT ...)), the
      `<PROJECT>Targets.cmake` file contains logic for computing the
      `_IMPORT_PREFIX` from its own location.  This `_IMPORT_PREFIX` is then
      used in the `<PROJECT>Targets-<config>.cmake` file to generate the
      `IMPORTED_LOCATION_<CONFIG>`.  The generation unconditionally appends a
      "/" to `_IMPORT_PREFIX` before appending the rest of the path.  If
      `_IMPORT_PREFIX` is "/", then the `IMPORTED_LOCATION_<CONFIG>`
      properties all start with exactly two leading slashes ("//").
      
      Exactly two leading slashes is a special case in POSIX file paths, such
      that its interpretation is left up to the implementation.  This means
      that changing the path prefix from "/" to "//" should not be allowed.
      
      Since references to `_IMPORT_PREFIX` are always followed by a "/",
      simply check the value to replace "/" with "".
      290e4ce8
  22. 03 Sep, 2016 1 commit
  23. 16 Aug, 2016 1 commit
  24. 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
  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 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
  27. 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
  28. 21 Jan, 2016 1 commit
    • Andrey Pokrovskiy's avatar
      cmExportInstallFileGenerator: Fix crash in FindNamespaces · 7dbfdddf
      Andrey Pokrovskiy authored
      Refactoring merged by commit 9afbb733 (Merge topic
      'use-generator-target', 2015-10-20) in and around commit 381e7afd
      (cmExportSet: Store a cmGeneratorTarget, 2015-10-17) forgot to update
      one place in this method.  This leads to a crash in code such as
      
        add_library(A a.c)
        add_library(B b.c)
        target_link_libraries(B A)
        install(TARGETS B DESTINATION lib EXPORT ExpB)
        install(EXPORT ExpB DESTINATION lib/cmake/test)
        add_executable(C c.c)
        install(TARGETS C DESTINATION bin EXPORT ExpC)
      
      Fix the target name reference to avoid using an unpopulated Target
      pointer.
      7dbfdddf
  29. 20 Oct, 2015 1 commit
  30. 19 Oct, 2015 1 commit
  31. 18 Oct, 2015 7 commits
  32. 14 Oct, 2015 1 commit
    • 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
  33. 23 Aug, 2015 1 commit