1. 19 Oct, 2016 2 commits
  2. 17 Oct, 2016 1 commit
  3. 16 Oct, 2016 1 commit
    • Stephen Kelly's avatar
      cmTarget: Move sanity checks and computed property access to callers · c3fb0d95
      Stephen Kelly authored
      The GetProperty method is now just accessing contained data, meaning it
      can be implemented in cmState.
      Remove the cmMakefile context from the signature as a result and remove
      the overload with the same signature.
      Add a GetComputedProperty to cmTarget so that templates can be properly
      instantiated.  Otherwise the Commands would need to be able to reach the
      specializations which are currently in cmTarget.cxx.
      As a side-effect, the CMP0026 warning now gives a backtrace to the
      target when issued from a generator expression.
  4. 15 Oct, 2016 3 commits
  5. 03 Oct, 2016 1 commit
  6. 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.
  7. 20 Sep, 2016 2 commits
    • Brad King's avatar
      Fortran: Use module dir flag if needed for default module directory · 7b5f8567
      Brad King authored
      Our buildsystem model says that the default Fortran module output
      directory is the build tree directory corresponding to the source tree
      `CMakeLists.txt` file adding the current target.  Extend
      `cmGeneratorTarget::GetFortranModuleDirectory` to allow generators to
      pass in the compiler working directory.  If the working directory does
      not match the default Fortran module output directory then we need an
      explicit module directory flag (e.g. `-J`) to tell the compiler to
      put/use modules in the latter.
      This does not affect the Makefile generator but will be useful for
      future introduction of Fortran support to the Ninja generator.
    • Brad King's avatar
      cmGeneratorTarget: Refactor Fortran module directory lookup · 1777570f
      Brad King authored
      Make `target_module_dir` and owned value so we can modify it.
  8. 15 Sep, 2016 1 commit
  9. 13 Sep, 2016 1 commit
  10. 08 Sep, 2016 3 commits
  11. 03 Sep, 2016 1 commit
  12. 18 Aug, 2016 1 commit
  13. 16 Aug, 2016 1 commit
  14. 22 Jul, 2016 2 commits
  15. 29 Jun, 2016 1 commit
    • Brad King's avatar
      Avoid using KWSys auto_ptr by adopting it ourselves · b5ec5b09
      Brad King authored
      Replace use of cmsys::auto_ptr with a CM_AUTO_PTR macro that maps to
      our own implementation adopted from the KWSys auto_ptr implementation.
      Later we may be able to map CM_AUTO_PTR to std::auto_ptr on compilers
      that do not warn about it.
      Automate the client site conversions:
          git grep -l auto_ptr -- Source/ | grep -v Source/kwsys/ | xargs sed -i \
  16. 28 Jun, 2016 1 commit
  17. 27 Jun, 2016 1 commit
  18. 21 Jun, 2016 1 commit
  19. 17 Jun, 2016 1 commit
  20. 14 Jun, 2016 1 commit
  21. 10 Jun, 2016 1 commit
  22. 02 Jun, 2016 1 commit
    • Daniel Pfeifer's avatar
      Simplify boolean expressions · 7f6b8d33
      Daniel Pfeifer authored
      Use clang-tidy's readability-simplify-boolean-expr checker.
      After applying the fix-its, revise all changes *very* carefully.
      Be aware of false positives and invalid changes.
  23. 25 May, 2016 1 commit
    • Brad King's avatar
      Add a variable to specify language-wide system include directories · c1340827
      Brad King authored
      Create a `CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES` variable to specify
      system include directories for for `<LANG>` compiler command lines.
      This plays a role for include directories as the existing
      `CMAKE_<LANG>_STANDARD_LIBRARIES` variable does for link libraries.
  24. 24 May, 2016 1 commit
  25. 16 May, 2016 2 commits
    • 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.
    • Brad King's avatar
      cmGeneratorTarget: Protect macro code layout from clang-format · c7006d2e
      Brad King authored
      The `IMPLEMENT_VISIT_IMPL` macro must preserve a space before the `>`
      character in case the `DATATYPE` is a template type ending in `>`.
      Manually format the macro layout as clang-format would except for this
      space.  Then add markup to tell clang-format not to format this macro.
  26. 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.
  27. 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 <<
      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
  28. 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
            - 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>
  29. 16 Mar, 2016 1 commit
  30. 20 Jan, 2016 1 commit
    • Milian Wolff's avatar
      Remove temporary allocations when calling cmGeneratorTarget::GetName. · 275f2a85
      Milian Wolff authored
      This happens quite often from within comparisons such as in
      NamedGeneratorTargetFinder or FindGeneratorTargetImpl. It is the
      top hotspot of both, number of allocations as well as number of
      temporary allocations - the majority of calls lead to temporary
      In raw numbers, this patch removes ~1E6 temporary allocations of
      1.5E6 temporary allocations in total when running the cmake daemon
      on the KDevelop build dir. That is 2/3 of the total.
      This hotspot was found with heaptrack.
  31. 03 Dec, 2015 1 commit
    • Bartosz Kosiorek's avatar
      iOS: Fix framework resource directory layout (#15848) · e76ee2c0
      Bartosz Kosiorek authored
      A typical iOS application bundle (also Framework Bundle) contains the
      application executable and any resources used by the application (for
      instance, the application icon, other images, and localized content) in
      the top-level bundle directory.  The same rule applies to Framework
  32. 19 Nov, 2015 1 commit
    • Brad King's avatar
      Android: Restore generation of non-versioned soname (#15851) · 4ba76026
      Brad King authored
      Our check of CMAKE_PLATFORM_NO_VERSIONED_SONAME, originally added by
      commit v3.1.0-rc1~416^2 (Add basic Android platform module, 2014-06-06),
      was dropped accidentally by commit v3.4.0-rc1~250^2~21
      (cmGeneratorTarget: Move GetLibraryNames from cmTarget, 2015-08-04).
      Restore the check in the new location of the GetLibraryNames method.