1. 16 May, 2016 1 commit
    • Kitware Robot's avatar
      Revise C++ coding style using clang-format · d9fd2f54
      Kitware Robot authored and Brad King's avatar Brad King committed
      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.
  2. 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>
  3. 19 Feb, 2016 1 commit
  4. 01 Oct, 2015 1 commit
    • Brad King's avatar
      Tests: Use consistent C++ flags FindPackageModeMakefileTest · 85d7a610
      Brad King authored
      Rather than using the CXXFLAGS environment variable in the make-only
      build, copy the CMAKE_CXX_FLAGS used to build the files on the CMake
      side.  This will account for any changes made by CompileFlags.cmake
      or cache-provided flags.
  5. 14 Apr, 2014 1 commit
  6. 11 Jan, 2014 1 commit
    • Stephen Kelly's avatar
      Tests: Fix find-package mode test. · dea71aae
      Stephen Kelly authored
      The all target was depending on the clean and pngtest targets, but
      when running the tests with -jN, those can be executed out of order.
      Make the main.o target depend on the clean target instead to fix
  7. 11 Oct, 2013 1 commit
    • Stephen Kelly's avatar
      cmTarget: Deprecate the LOCATION target property with a policy. · e4e5b28c
      Stephen Kelly authored
      The final location and name of a build-target is not determined
      until generate-time. However, reading the LOCATION property from
      a target is currently allowed at configure time. Apart from creating
      possibly-erroneous results, this has an impact on the implementation
      of cmake itself, and prevents some major cleanups from being made.
      Disallow reading LOCATION from build-targets with a policy. Port some
      existing uses of it in CMake itself to use the TARGET_FILE generator
  8. 19 Jun, 2012 1 commit
    • Daniel R. Gomez's avatar
      Fix FindPackageMode test Makefile (#13314) · 09ff191c
      Daniel R. Gomez authored and Brad King's avatar Brad King committed
      Use CXXFLAGS in the makefile's link rule since it invokes the C++
      compiler front-end.  Retool the makefile not to require GNU Make.  Using
      backticks instead of $(shell ...) is safe so long as one guards against
      the possibility of backslashes getting inside the backticks, so use
      temporary files and shell variables to avoid them.
  9. 12 Oct, 2011 1 commit
    • Alexander Neundorf's avatar
      Silence make on OpenBSD in FindPackageModeTest(#12508) · 0d44ce2b
      Alexander Neundorf authored
      BSD make doesn't use -v for printing its name and version, and so
      complains on stderr that this is a bad command line option, used
      in Tests/FindPackageModeMakefileTest/CMakeLists.txt .
      Silence stderr to make that ugly output go away.
      Patch by David Coppy.
  10. 18 Aug, 2011 1 commit
  11. 17 Aug, 2011 3 commits
    • Alexander Neundorf's avatar
      Only enable the test when using GNU make · 7d693108
      Alexander Neundorf authored
      The makefile used in the test uses $(shell ...), which is
      AFAIK a GNU extension, and will probably not work e.g. with OpenBSD make.
      According to the FreeBSD make manpage their make has a != assignment,
      which seems to do something similar, but I don't have such a system
      around for testing.
      Also, the point of this test is not to write a portable makefile,
      but to check whether cmake --find-package prints a correct string.
    • Alexander Neundorf's avatar
      Make the test harder by always having a space in the include dirs · 30111499
      Alexander Neundorf authored
      The commit message for the previous commit was wrong, it should
      have been: fix the test by using $(shell ...) syntax instead
      of backticks in the Makefile.
      With backticks I couldn't get the quoting right.
      Printing -I"/some/path with space" did not work, the compiler
      complained that there is not file "with". Also backslashes in
      different numbers did not make it work.
    • Alexander Neundorf's avatar
      Make the --find-package test harder · ab57ff61
      Alexander Neundorf authored
      Now it is guaranteed that the include paths always contain a space.
      This should make the cont. build fail.
  12. 16 Aug, 2011 1 commit
  13. 15 Aug, 2011 1 commit
    • Alexander Neundorf's avatar
      Fix test on OpenBSD with BSD make · aecfc1fd
      Alexander Neundorf authored
      BSD make doesn't seem to support -C, so do not use it,
      According to the documentation the working directory is set
      to CMAKE_CURRENT_BINARY_DIR anyway, so it should work just the same.
  14. 14 Aug, 2011 1 commit
  15. 11 Aug, 2011 2 commits