1. 30 Jan, 2019 2 commits
    • Brad King's avatar
      Ninja: Use deps=gcc for Intel Compiler on Windows · a624a3e1
      Brad King authored
      Ninja 1.9 supports the depfile format generated by this compiler.
      Use `deps = gcc` when the version of Ninja is new enough.
      Unfortunately the Intel Compiler for Windows does not properly
      escape spaces in paths written to a depfile so if there is a
      space in the path we must still fall back to `deps = msvc`.
      Fixes: #18855
    • Brad King's avatar
      Ninja: Drop unnecessary deptype customization infrastructure · 699cd032
      Brad King authored
      Do not pass `CMAKE_NINJA_DEPTYPE_<LANG>` in place of `deps = gcc`.
      If Ninja ever introduces a new dependency type we will likely need
      to update CMake for it anyway.
  2. 24 Jan, 2019 1 commit
  3. 18 Jan, 2019 1 commit
  4. 15 Jan, 2019 2 commits
  5. 15 Dec, 2018 1 commit
  6. 18 Sep, 2018 1 commit
  7. 07 Sep, 2018 1 commit
    • Brad King's avatar
      genex: Simplify cmGeneratorExpressionInterpreter · 1b57f495
      Brad King authored
      All callers were constructing with a non-empty target name using the
      target whose pointer was passed anyway.  Drop this argument.  Simplify
      logic accordingly.  Re-order constructor arguments to match the
      cmCompiledGeneratorExpression::Evaluate arguments.
      Also remove unnecessary getters.
  8. 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:
  9. 27 Jun, 2018 1 commit
  10. 01 Jun, 2018 1 commit
    • Kitware Robot's avatar
      Revise C++ coding style using clang-format-6.0 · d7204e64
      Kitware Robot authored
      Run the `clang-format.bash` script to update all our C and C++ code to a
      new style defined by `.clang-format`.  Use `clang-format` version 6.0.
      * 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.
  11. 26 Apr, 2018 2 commits
    • Brad King's avatar
      Ninja: Avoid empty phony edges for target ordering · 625b8f90
      Brad King authored
      Since commit v3.9.0-rc1~230^2~2 (ninja: break unnecessary target
      dependencies, 2017-04-17) we unconditionally generate a phony edge for
      target ordering.  It is needed in case a later target depends on it.
      However, if the phony edge has no inputs then `ninja -d explain` prints:
          ninja explain: output ... of phony edge with no inputs doesn't exist
      Furthermore the phony edge's output is considered dirty and can cause
      dependents to be incorrectly considered dirty.  Avoid this by always
      generating at least one input to the target ordering phony edges.
      If we have no real dependencies just use a path that always exists.
      Fixes: #17942
    • Brad King's avatar
      Ninja: Do not add empty custom command for file(GENERATE) outputs · 0826c201
      Brad King authored
      Internally we mark `file(GENERATE)` outputs as `GENERATED` in order
      to tell custom command dependency tracing logic not to expect the
      files to exist on disk yet.  This is because we do not generate the
      files until after that tracing is done.
      The Ninja generator also interprets the `GENERATED` property to mean
      that it is expected that some build rule will generate the file if
      another build rule depends on it.  If the generator does not know of a
      custom command that generates the file then it adds an empty one so that
      the `ninja` build tool does not complain about a dependency on a file
      that does not exist and has no rule to generate it.  However, this step
      is not necessary for `file(GENERATE)` outputs because there is no build
      rule to generate them and they will exist before `ninja` runs.
      Add an additional `__CMAKE_GENERATED_BY_CMAKE` property internally to
      tell the Ninja generator that a `GENERATED` file will exist before the
      build starts and is not expected to have a build rule producing it.
      Fixes: #17942
  12. 05 Apr, 2018 3 commits
  13. 27 Feb, 2018 1 commit
    • Ilya A. Kriveshko's avatar
      Fix combined use of compiler launcher with lint tools · eaf9f69d
      Ilya A. Kriveshko authored
      When using ccache with clang-tidy, ccache needs to wrap compiler
      invocation, rather than cmake invocation.  But it needs to do it without
      affecting the command line that iwyu-like tools are receiving.
      With this fix, if __run_co_compile is used, compile launcher is passed
      using the new --launcher option, but if __run_co_compile is not needed,
      compiler launcher is prepended to the command line as before.
      To better illustrate the change: with this fix if running clang-tidy
      with CXX_COMPILER_LAUNCHER set to "/usr/bin/time;-p;ccache" (time -p
      added strictly for illustration purposes), the command line changes
          /usr/bin/time -p ccache cmake -E __run_co_compile \
              --tidy=clang-tidy ... -- g++ ...
          cmake -E __run_co_compile \
              --launcher="/usr/bin/time;-p;ccache" \
              --tidy=clang-tidy ... -- g++ ...
      This allows the compiler to be run via the launcher, but leaves tidy
      (& friends) invocations unaffected.
      Fixes: #16493
  14. 20 Feb, 2018 1 commit
  15. 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.
  16. 26 Jan, 2018 1 commit
  17. 24 Jan, 2018 2 commits
  18. 23 Jan, 2018 1 commit
  19. 13 Dec, 2017 1 commit
  20. 05 Dec, 2017 1 commit
  21. 04 Dec, 2017 1 commit
  22. 21 Nov, 2017 1 commit
    • Brad King's avatar
      Fortran: Add option to run the compiler through launcher tools · f19c70c3
      Brad King authored
      Add a `Fortran_COMPILER_LAUNCHER` target property like those added for C
      and CXX by commit v3.4.0-rc1~450^2 (Add options to launch the compiler
      through tools like ccache or distcc, 2015-06-04) and CUDA by commit
      v3.10.0-rc1~531^2 (CUDA: Add option to run the compiler through launcher
      tools, 2017-06-09).
      Fixes: #17499
  23. 25 Sep, 2017 2 commits
  24. 15 Sep, 2017 1 commit
  25. 13 Sep, 2017 1 commit
    • Bill Hoffman's avatar
      Clean up iwyu code to not be one big if statement. · 3bbe95f5
      Bill Hoffman authored
      This commit changes the internal -E__run_iwyu to be -E__run_co_compile. This
      is used for co-compile commands. These are tools that want to mirror the
      compiler. For each compiler invocation the tool will be invoked first. This
      started as a way to implement include what you use (iwyu), but has expanded
      to include cpplint, cppcheck and others. Likely there will be more in the
      future as well. This commit implements each one in its own function and
      provides a way to add additional ones in the future with less work.
  26. 12 Sep, 2017 1 commit
  27. 30 Aug, 2017 1 commit
  28. 24 Aug, 2017 1 commit
  29. 23 Aug, 2017 1 commit
  30. 13 Jul, 2017 1 commit
  31. 10 Jul, 2017 1 commit
    • Yurii Batrak's avatar
      Ninja: always use response file for cmake_ninja_dyndep · 4ef0eedb
      Yurii Batrak authored
      Command line argument passed to the internal tool "cmake_ninja_dyndep"
      could hit MAX_ARG_STRLEN on Linux for projects with a large code base.
      To prevent such problems, a response file was opted for argument transfer
      in all cases, not only on Windows.
  32. 09 Jun, 2017 1 commit
  33. 30 May, 2017 1 commit