1. 27 Jul, 2016 1 commit
    • Daniel Pfeifer's avatar
      Use string(APPEND) in Tests · 7a649111
      Daniel Pfeifer authored
      Automate with:
      
      find Tests -type f -print0 | xargs -0 perl -i -0pe \
      's/set\(([a-zA-Z0-9_]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
      7a649111
  2. 08 Jul, 2016 1 commit
  3. 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
  4. 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
  5. 10 Mar, 2016 1 commit
  6. 08 Feb, 2016 1 commit
  7. 12 Jul, 2015 1 commit
    • Stephen Kelly's avatar
      cmState: Restore renamed commands on cleanup. · d4f032b5
      Stephen Kelly authored
      Commit v3.3.0-rc1~196^2~7 (cmake: Simplify command clean up
      loop., 2015-04-12) introduced a bug that built-in commands which
      were renamed no longer had their original name restored when
      cleanup is performed between configure runs.  Check for that
      and restore the commands with their original name.
      
      Extend the complex test for this. That test is run by ctest with
      the --build-two-config command line option.
      d4f032b5
  8. 22 Jan, 2015 1 commit
  9. 08 Jan, 2015 1 commit
    • Clinton Stimpson's avatar
      Encoding: Modify tests to work using non-ascii paths. · 9a8ab866
      Clinton Stimpson authored
      For complex*, CustomCommand and OutDir tests, non-ascii paths
      are avoided in test code by using relative paths, and setting
      the working when running the test.  This also avoids the
      need to internationalize the test code.
      
      For RunCMake.GeneratorExpression, use a UTF-8 encoding in
      file(STRINGS) to retrieve the compiled absolute path correctly.
      9a8ab866
  10. 22 Jul, 2014 1 commit
    • Brad King's avatar
      Tests: Set policies in 'complex' tests · fb95f820
      Brad King authored
      These tests cover the OLD behavior of some policies.  Set them to
      OLD to avoid warnings in the test output.  Leave a comment that
      explains why this is done here but not recommended in general.
      fb95f820
  11. 05 Jun, 2014 1 commit
  12. 25 Apr, 2014 1 commit
  13. 14 Apr, 2014 2 commits
  14. 13 Nov, 2013 1 commit
  15. 23 Oct, 2013 1 commit
    • Brad King's avatar
      Drop compatibility with CMake < 2.4 · 7d47c693
      Brad King authored
      Drop all behavior activated by setting CMAKE_BACKWARDS_COMPATIBILITY to
      a value lower than 2.4, and generate an error when projects or the user
      attempt to do so.  In the error suggest using a CMake 2.8.x release.
      
      Teach cmake_minimum_required to warn about projects that do not require
      at least CMake 2.4.  They are not supported by CMake >= 3.0.
      
      Replace the documentation of CMAKE_BACKWARDS_COMPATIBILITY with a
      reference to policy CMP0001.
      7d47c693
  16. 08 Oct, 2013 1 commit
    • Adrien Destugues's avatar
      Haiku: Several fixes to platform module · 7ebc1cb2
      Adrien Destugues authored
      * Do not define BEOS anymore (this includes workarounds which we don't
        need most of the time in Haiku, so we prefer opt-in IF(HAIKU) in the
        cmake files instead).
      * On the other hand, do define UNIX (we are trying to be compliant) and
        HAIKU (there is still a number of things we don't do like the
        average UNIX clone)
      * Do not use UnixPaths, as our filesystem hierarchy isn't anything like
        what it expects.
      * Do not use -nostart, which the compiler doesn't know about anymore.
        This used to be an Haiku extension to gcc, and is equivalent to
        -shared which is the default gcc option.
      * While "dl" functions are provided in libroot, this is always
        implicitly linked so there is no need to tell cmake about it.
      * Forcing position-independent code is not needed, so remove it.
      * On the other hand, include appropriate linker options for executables
        and shared libraries.
      * Support for the two available compilers in Haiku (gcc2 and gcc4) and
        pick the right headers and libraries according to the currently
        selected one.
      * With the adoption of the package manager, the directory layout was
        changed. Tell cmake where to look for header files and libraries.
      * As we don't define BEOS anymore, enable the workaround we still need
        for HAIKU as well. This is the lack of a libm (it is part of the
        implicitly linked in libroot)
      Applied-by: Rolf Eike Beer's avatarRolf Eike Beer <eike@sf-mail.de>
      7ebc1cb2
  17. 02 Jun, 2013 1 commit
  18. 16 Apr, 2013 1 commit
  19. 04 Mar, 2013 1 commit
  20. 13 Aug, 2012 3 commits
    • Kitware Robot's avatar
      Remove CMake-language block-end command arguments · 9db31162
      Kitware Robot authored
      Ancient versions of CMake required else(), endif(), and similar block
      termination commands to have arguments matching the command starting the
      block.  This is no longer the preferred style.
      
      Run the following shell code:
      
      for c in else endif endforeach endfunction endmacro endwhile; do
          echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
      done >convert.sed &&
      git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
      egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
      egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
      xargs -0 sed -i -f convert.sed &&
      rm convert.sed
      9db31162
    • Kitware Robot's avatar
      Convert CMake-language commands to lower case · 77543bde
      Kitware Robot authored
      Ancient CMake versions required upper-case commands.  Later command
      names became case-insensitive.  Now the preferred style is lower-case.
      
      Run the following shell code:
      
      cmake --help-command-list |
      grep -v "cmake version" |
      while read c; do
          echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
      done >convert.sed &&
      git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
      egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
      xargs -0 sed -i -f convert.sed &&
      rm convert.sed
      77543bde
    • Kitware Robot's avatar
      Remove trailing whitespace from most CMake and C/C++ code · 7bbaa428
      Kitware Robot authored
      Our Git commit hooks disallow modification or addition of lines with
      trailing whitespace.  Wipe out all remnants of trailing whitespace
      everywhere except third-party code.
      
      Run the following shell code:
      
      git ls-files -z -- \
       bootstrap doxygen.config '*.readme' \
       '*.c' '*.cmake' '*.cpp' '*.cxx' \
       '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \
       '*.mm' '*.pike' '*.py' '*.txt' '*.vim' |
      egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' |
      egrep -z -v '^(Modules/CPack\..*\.in)' |
      xargs -0 sed -i 's/ \+$//'
      7bbaa428
  21. 18 Feb, 2012 1 commit
  22. 23 Dec, 2011 7 commits
  23. 20 Dec, 2010 1 commit
  24. 30 Oct, 2009 1 commit
  25. 09 Oct, 2009 1 commit
  26. 07 Oct, 2009 1 commit
    • Brad King's avatar
      Make Complex test of CMakeLib more optional · 7dcfc8d2
      Brad King authored
      Previously we passed inputs to the decision to each Complex test and let
      the test source decide.  This commit moves the decision out of the tests
      and makes it an option() in their source.  This makes it possible to
      build the Complex tests from outside the CMake test tree.
      7dcfc8d2
  27. 10 Jul, 2009 1 commit
  28. 08 Jul, 2009 1 commit
  29. 01 May, 2009 1 commit
    • Brad King's avatar
      ENH: Always imply CLEAN_DIRECT_OUTPUT target prop · 430cc2b4
      Brad King authored
      This property was left from before CMake always linked using full path
      library names for targets it builds.  In order to safely link with
      "-lfoo" we needed to avoid having both shared and static libraries in
      the build tree for targets that switch on BUILD_SHARED_LIBS.  This meant
      cleaning both shared and static names before creating the library, which
      led to the creation of CLEAN_DIRECT_OUTPUT to disable the behavior.
      
      Now that we always link with a full path we do not need to clean old
      library names left from an alternate setting of BUILD_SHARED_LIBS.  This
      change removes the CLEAN_DIRECT_OUTPUT property and instead uses its
      behavior always.  It removes some complexity from cmTarget internally.
      430cc2b4
  30. 16 Mar, 2009 2 commits
    • Brad King's avatar
      ENH: Allow projects to disable per-rule echo lines · 493f88ce
      Brad King authored
      This creates global property RULE_MESSAGES which can be set to disbale
      per-rule progress and action reporting.  On Windows, these reports may
      cause a noticable delay due to the cost of starting extra processes.
      This feature will allow scripted builds to avoid the cost since they do
      not need detailed information anyway.  This replaces the RULE_PROGRESS
      property created earlier as it is more complete.  See issue #8726.
      493f88ce
    • Brad King's avatar
      ENH: Allow projects to disable per-rule progress · 2f651c2e
      Brad King authored
      This creates global property RULE_PROGRESS which can be set to disbale
      per-rule progress reporting.  On Windows, progress reports may cause a
      noticable delay due to the cost of starting an extra process.  This
      feature will allow scripted builds to avoid the cost since they do not
      need detailed progress anyway.  See issue #8726.
      2f651c2e