1. 20 Nov, 2019 2 commits
  2. 11 Nov, 2019 2 commits
  3. 05 Nov, 2019 2 commits
  4. 09 Oct, 2019 1 commit
  5. 03 Oct, 2019 1 commit
  6. 01 Oct, 2019 1 commit
  7. 30 Sep, 2019 1 commit
    • Brad King's avatar
      Restore "all" target in subdirectories marked EXCLUDE_FROM_ALL · b3b1c7bf
      Brad King authored
      The "all" target in each directory is supposed to have targets from that
      directory even if the directory itself is marked `EXCLUDE_FROM_ALL` in
      its parent.  This was broken by commit dc688857 (Pass EXCLUDE_FROM_ALL
      from directory to targets, 2019-01-15, v3.14.0-rc1~83^2) which made the
      participation of a target in "all" independent of context.  Revert much
      of the logic change from that commit to restore the old behavior.  Then
      re-implement the behavior intended by the commit to keep its test
      working.  Extend the test to cover the old behavior too.
      
      Fixes: #19753
      b3b1c7bf
  8. 26 Sep, 2019 2 commits
  9. 23 Sep, 2019 1 commit
  10. 20 Sep, 2019 1 commit
    • Marc Chevrier's avatar
      cmstd: Modernize CMake system headers · c688b401
      Marc Chevrier authored and Brad King's avatar Brad King committed
      Provide a standardized way to handle the C++ "standard" headers
      customized to be used with current CMake C++ standard constraints.
      Offer under directory `cm` headers which can be used as direct
      replacements of the standard ones.  For example:
      
          #include <cm/string_view>
      
      can be used safely for CMake development in place of the `<string_view>`
      standard header.
      
      Fixes: #19491
      c688b401
  11. 16 Sep, 2019 2 commits
  12. 10 Sep, 2019 1 commit
    • 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
  13. 09 Sep, 2019 2 commits
  14. 04 Sep, 2019 1 commit
  15. 30 Aug, 2019 1 commit
  16. 28 Aug, 2019 1 commit
  17. 23 Aug, 2019 1 commit
  18. 22 Aug, 2019 1 commit
    • Sebastian Holtermann's avatar
      Source sweep: Use cmStrCat for string concatenation · 9b334397
      Sebastian Holtermann authored
      This patch is generated by a python script that uses regular expressions to
      search for string concatenation patterns of the kind
      
      ```
      std::string str = <ARG0>;
      str += <ARG1>;
      str += <ARG2>;
      ...
      ```
      
      and replaces them with a single `cmStrCat` call
      
      ```
      std::string str = cmStrCat(<ARG0>, <ARG1>, <ARG2>, ...);
      ```
      
      If any `<ARGX>` is itself a concatenated string of the kind
      
      ```
      a + b + c + ...;
      ```
      
      then `<ARGX>` is split into multiple arguments for the `cmStrCat` call.
      
      If there's a sequence of literals in the `<ARGX>`, then all literals in the
      sequence are concatenated and merged into a single literal argument for
      the `cmStrCat` call.
      
      Single character strings are converted to single char arguments for
      the `cmStrCat` call.
      
      `std::to_string(...)` wrappings are removed from `cmStrCat` arguments,
      because it supports numeric types as well as string types.
      
      `arg.substr(x)` arguments to `cmStrCat` are replaced with
      `cm::string_view(arg).substr(x)`
      9b334397
  19. 19 Aug, 2019 1 commit
  20. 18 Aug, 2019 1 commit
  21. 17 Aug, 2019 1 commit
  22. 14 Aug, 2019 1 commit
  23. 09 Aug, 2019 1 commit
  24. 05 Aug, 2019 2 commits
  25. 24 Jul, 2019 1 commit
    • Sebastian Holtermann's avatar
      cmMakefile: Let AddDefinition accept a value as cm::string_view · e91bfe44
      Sebastian Holtermann authored
      This changes `cmMakefile::AddDefinition` to take a `cm::string_view` as value
      argument instead of a `const char *`.
      
      Benefits are:
      - `std::string` can be passed to `cmMakefile::AddDefinition` directly without
        the `c_str()` plus string length recomputation fallback.
      - Lengths of literals passed to `cmMakefile::AddDefinition` can be computed at
        compile time.
      
      In various sources uses of `cmMakefile::AddDefinition` are adapted to avoid
      `std::string::c_str` calls and the `std::string` is passed directly.
      Uses of `cmMakefile::AddDefinition`, where a `nullptr` `const char*` might
      be passed to `cmMakefile::AddDefinition` are extended with `nullptr` checks.
      e91bfe44
  26. 14 Jul, 2019 1 commit
  27. 10 Jul, 2019 1 commit
    • Brad King's avatar
      IWYU: Fix handling of <memory> standard header · 71fbebd1
      Brad King authored
      An old workaround for `std::allocator_traits<>::value_type` lints from
      IWYU on `std::vector<>` usage breaks IWYU's handling of `<memory>`.
      Convert the workaround to use the same approach we already use for a
      workaround of `std::__decay_and_strip<>::::__type` lints.  Then update
      the `<memory>` inclusions to follow the now-correct IWYU lints.
      71fbebd1
  28. 23 May, 2019 1 commit
  29. 15 May, 2019 1 commit
  30. 14 May, 2019 1 commit
    • Rosen Matev's avatar
      Support job pools in custom commands and targets · 9f76961d
      Rosen Matev authored
      Provide a way for custom commands and targets to set the pool variable
      of the ninja build statement. Setting `JOB_POOL` is not compatible with
      `USES_TERMINAL`, which implies the `console` pool.
      
      The option is silently ignored with other generators.
      
      Closes: #18483
      9f76961d
  31. 13 May, 2019 1 commit
    • Sebastian Holtermann's avatar
      cmSystemTools: Add ExpandedListArgument and ExpandedLists methods · cdff7f4e
      Sebastian Holtermann authored
      Changes
      -------
      
      In `cmSystemTools` this
      - renames the method `ExpandList` to `ExpandLists` and makes it iterator based
      
      and adds the methods
      - `std::vector<std::string> ExpandedLists(InputIt first, InputIt last)`
      - `std::vector<std::string> ExpandedListArgument(const std::string& arg,
                                                             bool emptyArgs)`
      
      Both return the  `std::vector<std::string>` instead of taking a return vector
      reference like `cmSystemTools::ExpandLists` and
      `cmSystemTools::ExpandListArgument`.
      
      Motivation
      ----------
      
      Since C++17 return value optimization is mandatory, so returning a
      `std:vector<std::string>` from a function should be (at least) as fast as
      passing a return vector reference to the function.
      
      The new methods can replace `cmSystemTools::ExpandLists` and
      `cmSystemTools::ExpandListArgument` in many cases, which leads to
      shorter and simpler syntax.
      
      E.g. the commonly used pattern
      ```
        if (const char* value = X->GetProperty("A_KEY_STRING")) {
          std::vector<std::string> valuesList;
          cmSystemTools::ExpandListArgument(value, valuesList);
          for (std::string const& i : valuesList) {
            doSomething(i);
          }
        }
      ```
      becomes
      ```
        if (const char* value = X->GetProperty("A_KEY_STRING")) {
          for (std::string const& i :
            cmSystemTools::ExpandedListArgument(value)) {
            doSomething(i);
          }
        }
      ```
      cdff7f4e
  32. 11 Apr, 2019 2 commits