Commit Graph

31598 Commits

Author SHA1 Message Date
Brad King a0d31f3bb3 Merge topic 'clang-format-include-order'
54f71cd7 Source: Sort includes the way clang-format would
7b6ffa59 Source: Sort includes of sys/types.h as clang-format would
be14fe48 Source: Stabilize include order of sys/types.h before sys/stat.h
5e871f70 Tests: Sort includes of sys/types.h as clang-format would
a20d7d48 Tests: Fix Plugin test include order
2016-05-03 10:16:55 -04:00
Brad King 1109be2d90 Merge topic 'FindHDF5-debug-suffix'
313676c9 FindHDF5: Add another debug suffix
2016-05-03 10:16:53 -04:00
Brad King 54f71cd72c Source: Sort includes the way clang-format would
Re-apply the approach from commit e1c77472 (Format include directive
blocks and ordering with clang-format, 2016-04-29) but this time be
more careful about exclusion of parser generator sources:

    $ git ls-files -z -- \
        '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' |
      egrep -z -v '^Source/cmCommandArgumentLexer\.' |
      egrep -z -v '^Source/cmCommandArgumentParser\.' |
      egrep -z -v '^Source/cmDependsJavaLexer\.' |
      egrep -z -v '^Source/cmDependsJavaParser\.' |
      egrep -z -v '^Source/cmExprLexer\.' |
      egrep -z -v '^Source/cmExprParser\.' |
      egrep -z -v '^Source/cmFortranLexer\.' |
      egrep -z -v '^Source/cmFortranParser\.' |
      egrep -z -v '^Source/cmListFileLexer\.' |
      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

Also drop use of custom sorting for `sys/types.h`.
2016-05-03 10:08:41 -04:00
Brad King 7b6ffa59b1 Source: Sort includes of sys/types.h as clang-format would
When this header is included in blocks where order does not matter, just
place it in lexicographic order as clang-format would by default.
2016-05-03 10:08:41 -04:00
Brad King be14fe4857 Source: Stabilize include order of sys/types.h before sys/stat.h
Include the two headers in an isolated block with a comment separating
them so that tools that re-order includes do not re-order these.
2016-05-03 10:08:41 -04:00
Brad King 5e871f7089 Tests: Sort includes of sys/types.h as clang-format would 2016-05-03 10:08:41 -04:00
Brad King a20d7d4821 Tests: Fix Plugin test include order
Fix the order accidentally broken by commit e1c77472 (Format include
directive blocks and ordering with clang-format, 2016-04-29).  Include
the KWSys header first in its own block so that it is not moved by tools
that re-order includes.  It must be included first to define large file
support macros consistently.
2016-05-03 10:08:41 -04:00
Ilya Kulakov 79410eeb1f ExternalProject: Initialize Git submodules recursively and on update (#16083) 2016-05-03 10:04:37 -04:00
Brad King 59d28b2849 libarchive: Drop early use of crypto library
We already add the crypto library after the ssl library when using
OpenSSL.  Do not add it to the list of libraries individually or we may
end up with the wrong order later.  Further investigation will be needed
to see how this change can be reconciled with the upstream need for the
original line.
2016-05-03 09:53:05 -04:00
Brad King fa425910b7 Utilities/Release: Define NTDDI_VERSION for Windows binaries
LibArchive now defines this explicitly if it is not defined already.
Since we define _WIN32_WINNT explicitly, we must now define a consistent
value of NTDDI_VERSION explicitly too.
2016-05-03 09:09:19 -04:00
Brad King 66de0866a3 Ninja: Fix clang-cl /showIncludes prefix detection
We run MSVC-like compilers with the `/showIncludes` option and match the
output to extract the corresponding message.  Fix the matching to
support compilers like `clang-cl` that print the message on the first
line such that it is not preceded by a newline.

LLVM-Issue: https://llvm.org/bugs/show_bug.cgi?id=27226
2016-05-03 08:43:13 -04:00
Kitware Robot 4d59471a7e CMake Nightly Date Stamp 2016-05-03 00:01:08 -04:00
Brad King 5f948d2aa4 Help: Add policy summaries to cmake-policies(7)
In Sphinx output formats that print the toctree the policy numbers in
links from the cmake-policies(7) manual are not descriptive.  Convert
the toctree entries to cross-reference syntax and add the summary of
each policy.  For now simply duplicate the policy summary line.  We
already maintain copies in `cmPolicies.h` and `Help/policy/*.rst` docs.
2016-05-02 15:16:07 -04:00
Brad King b74d73e507 Help: Organize cmake-policies(7) manual by version of introduction 2016-05-02 15:16:07 -04:00
Brad King de37065661 cmRST: Parse toctree lines with Sphinx cross-reference syntax 2016-05-02 15:16:07 -04:00
Brad King 845cb217a7 CMP0059: Fix typo in policy description 2016-05-02 15:16:07 -04:00
Brad King 5a9b2b3b11 FindBoost: Fix Boost_NO_SYSTEM_PATHS to not consider environment (#15702)
Previously we added only NO_CMAKE_SYSTEM_PATH to find command calls.
Add NO_SYSTEM_ENVIRONMENT_PATH too so that paths found from system
environment variables are not considered either.
2016-05-02 11:43:28 -04:00
FARBOS Arnaud 313676c9f0 FindHDF5: Add another debug suffix
HDF5 1.8.16 (and likely others) names its debug libraries with a
`_debug` suffix intsead of `d`.
2016-05-02 11:31:35 -04:00
Brad King e9bc469b2a Merge branch 'upstream-LibArchive' into update-libarchive
Resolve conflicts in C code by taking their side.  Resolve conflicts in
CMake code by integrating the changes.
2016-05-02 10:48:48 -04:00
Brad King db9c40b4f5 Merge branch 'upstream-LibArchive' into update-libarchive 2016-05-02 10:47:53 -04:00
Brad King b2675cde5f libarchive: Remove CMake-specific README
We will now manage the libarchive source tree updates using
the `Utilities/Scripts/update-libarchive.bash` script.  Drop
the README that covered the old method.
2016-05-02 10:46:57 -04:00
LibArchive Upstream 501345e470 LibArchive 2016-04-30 (167e97be)
Code extracted from:

    https://github.com/libarchive/libarchive.git

at commit 167e97be1d35c1e0947d768adbf94712244aad6b (master).
2016-05-02 10:25:52 -04:00
Brad King 91e6da10eb Add script to update LibArchive from upstream 2016-05-02 10:25:15 -04:00
LibArchive Upstream fc8fc40f0a LibArchive 2015-10-21 (3bfe5f1f)
Code extracted from:

    https://github.com/libarchive/libarchive.git

at commit 3bfe5f1f8cc7afb63bfb93561a390050ca111c39 (3bfe5f1).
2016-05-02 10:22:43 -04:00
Bartosz Kosiorek 960afaad7f Help: Improve 'cmake -E md5sum' documentation 2016-05-02 10:02:12 -04:00
Bartosz Kosiorek 25ee2c86c1 Help: Add missing space in cmake(1) manual 2016-05-02 09:51:29 -04:00
Brad King 24b2a36778 Merge topic 'test-watcom-workaround'
47c29885 Tests: Fix RunCMake.BuildDepends filesystem delay for Watcom WMake
26790ad9 Tests: Add workaround to Wrapping test for Watcom failure
2016-05-02 09:24:23 -04:00
Brad King 067b21b675 Merge topic 'clang-format-include-order'
e1c77472 Format include directive blocks and ordering with clang-format
180538c7 Source: Stabilize include order
0e7bca92 Utilities/Release: Stabilize include order in WiX custom action
eb817be0 Tests: Stabilize include order in MFC, VSXaml, and VSWinStorePhone
eda313b4 Tests: Stabilize include order in StringFileTest
7110b754 CursesDialog: add missing cmState include
d7a5f255 Modules: Remove unused CMakeTestWatcomVersion.c file
2016-05-02 09:24:21 -04:00
Kitware Robot 2e6684c65d CMake Nightly Date Stamp 2016-05-02 00:01:16 -04:00
Kitware Robot ffbac71e07 CMake Nightly Date Stamp 2016-05-01 00:01:05 -04:00
Kitware Robot c9423a44de CMake Nightly Date Stamp 2016-04-30 00:01:08 -04:00
Brad King e1c7747253 Format include directive blocks and ordering with clang-format
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 <daniel@pfeifer-mail.de>
2016-04-29 13:58:54 -04:00
Brad King 180538c706 Source: Stabilize include order
Each source file has a logical first include file.  Include it in an
isolated block so that tools that sort includes do not move them.
2016-04-29 13:58:31 -04:00
Brad King 22e04bfe32 Merge topic 'vs-2015-update-2-features'
d2a06159 Features: Record features for VS 2015 Update 2
2016-04-29 13:28:36 -04:00
Brad King 9d2e306e98 Merge topic 'vs71-deprecate'
ce82e0a5 Deprecate Visual Studio 7 .NET 2003 generator
6a501b65 Tests: Drop test for VS 7.0 generator deprecation warnings
2016-04-29 13:28:33 -04:00
Brad King 43e21ce923 Merge topic 'clang-tidy-argv0'
304ab71d Clang-Tidy: Give entire compiler command line to clant-tidy tool
2016-04-29 13:28:28 -04:00
Brad King 47c298851b Tests: Fix RunCMake.BuildDepends filesystem delay for Watcom WMake
Our 1.125s delay does not seem to be long enough to be reliable with
the Watcom `wmake` tool.  Use a longer delay for Watcom.
2016-04-29 11:47:35 -04:00
Brad King 0e7bca923e Utilities/Release: Stabilize include order in WiX custom action
In `detect_nsis_overwrite.cpp` we include windows.h first, and we must
preserve that.  Place the include in an isolated block so that tools
that sort includes do not move it.
2016-04-29 10:56:59 -04:00
Brad King eb817be034 Tests: Stabilize include order in MFC, VSXaml, and VSWinStorePhone
These tests use a precompiled header that must be included first.
Include the header in an isolated block so that tools that sort
includes do not move it.
2016-04-29 10:56:59 -04:00
Daniel Pfeifer eda313b485 Tests: Stabilize include order in StringFileTest
This test generates a header file which is not self-contained.
Include it in a separate block of includes so that tools that
sort includes do not move it.
2016-04-29 10:56:58 -04:00
Daniel Pfeifer 7110b754fe CursesDialog: add missing cmState include 2016-04-29 09:12:32 -04:00
Brad King d7a5f25599 Modules: Remove unused CMakeTestWatcomVersion.c file
This file has not been used since commit v2.8.10~218^2~7^2 (Watcom:
Simplify compiler version detection, 2012-08-13).
2016-04-29 09:12:32 -04:00
Kitware Robot aa304cbeb2 CMake Nightly Date Stamp 2016-04-29 00:01:10 -04:00
Brad King d2a061596e Features: Record features for VS 2015 Update 2 2016-04-28 13:05:52 -04:00
Brad King 26790ad93b Tests: Add workaround to Wrapping test for Watcom failure
The Watcom tools do not seem to like our wrapFLTK executable
to mix C and C++ sources.  Work around this by using C++ for
both sources.
2016-04-28 10:20:40 -04:00
Brad King ce82e0a53f Deprecate Visual Studio 7 .NET 2003 generator
Update documentation to mark the generator deprecated.  Add a warning at
the end of generation plus an option to turn off the warning.
2016-04-28 10:09:20 -04:00
Brad King 6a501b6519 Tests: Drop test for VS 7.0 generator deprecation warnings
We removed this generator but forgot to remove this now-unused test
case.
2016-04-28 10:04:09 -04:00
Daniel Pfeifer 304ab71db0 Clang-Tidy: Give entire compiler command line to clant-tidy tool
The tool expects the entire compiler command, including `cc`.  It
will automatically skip that and extract the options it needs.
2016-04-28 09:42:31 -04:00
Brad King 5b4f771fd7 Merge topic 'intel-compiler-features'
21b1fa5c Help: Add notes for topic 'intel-compiler-features'
9addce99 Features: Record standard flags for Intel C/C++ on Windows
15a6c950 WCDH: Add Intel to list of supported compilers
36f32ede Features: Record standards and features for Intel C on UNIX
d028b948 Features: Specify minimum version Intel C++ 12.1
be910f00 Features: Record standards and features for Intel C++ on UNIX
7f401ae4 Features: Detect C default dialect on MSVC-like compilers
2016-04-28 09:26:09 -04:00
Brad King 954c06803d Merge topic 'ExternalProject-git-clone-shallow'
7db9f3f2 ExternalProject: Add option to perform a shallow Git clone (#15291)
2016-04-28 09:26:07 -04:00