Revert commit v3.1.0-rc1~255^2~5 (liblzma: Port from C99 to C89/90,
2014-07-13). We now compile as C99 or above except on MSVC where
we will use another approach.
Revert commit v3.1.0-rc1~255^2~2 (liblzma: Avoid defining a 'restrict'
macro, 2014-07-24). We will use another approach to deal with the
'restrict' keyword.
Since commit v3.12.0-rc1~325^2 (ccmake: Check for curses more robustly
before enabling, 2018-03-21) we may not enable ccmake by default when
using a non-system curses (e.g. the static curses we build on Linux for
our binaries). Enable the option explicitly for our prebuilt binaries.
The documentation for CPack generators previously lived in their
respective internal CMake modules. This setup was misleading,
because it implied that you should include the modules in your own
code, which is not the case. Moving the documentation into a
separate section does a better job of hiding the internal modules,
which are just an implementation detail. The generator documentation
has also been modified to remove any references to the module name.
The CPackIFW module is a special exception: since it has user-facing
macros, the documentation for these macros has been kept in the module
page, while all other documentation related to the IFW generator has
been moved into the new section.
To make it easier to find the new documentation, the old help pages
for the CPack*.cmake modules have not been deleted, but have been
replaced with a link to their respective help page in the new
documentation section.
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.
Update `.clang-format` with configuration to make the 6.0 format as
close as possible to what 3.8 produced before. Then revise the style:
* Indent preprocessor directives (a feature new since 3.8)
* Add a newline and indentation before inheritance `:` and `,`
Rename the Git attribute identifying the format to include the
clang-format version number: `format.clang-format-6.0`. This will aid
external infrastructure in knowing what version of the tool to run.
Versions of clang-format newer than 3.8 produce different output.
Our source code guide says that version 3.8 exactly must be used.
Update the comment in our `.clang-format` config file accordingly.
Add a check to our formatting script to verify the version.
Also update its tool search to look for the explicitly-named
3.8 variant first.
0d389d175a libuv: Revert local linux/sparc64 fix now that we have upstream fix
42fbb28516 Merge branch 'upstream-libuv' into update-libuv
c8b67ea119 libuv 2018-05-06 (bf605bd7)
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2049
Hyperlink text color does not stand out when used inside a literal block
because such blocks typically get syntax highlighting. Update our CSS
style to make the links more distinct.
Suggested-by: Kyle Edwards <kyle.edwards@kitware.com>
Upstream libuv commits:
* node-v0.6.0~28 (linux: use ioctl(FIONBIO) to set O_NONBLOCK, saves a syscall, 2011-10-29)
* v1.11.0~11 (unix: use async-signal safe functions between fork and exec, 2016-12-12)
left an asymmetry in the way O_NONBLOCK is set and cleared. Normally
ioctl/FIONBIO is used for both. However, uv_spawn uses fcntl/O_NONBLOCK
to clear O_NONBLOCK between fork and exec. This fails on Linux/sparc64
where setting via ioctl/FIONBIO actually sets two bits (in O_NDELAY)
that cause clearing via fcntl/O_NONBLOCK to be silently ignored (though
clearing via ioctl/FIONBIO or fcntl/O_NDELAY works).
Since CMake commit v3.11.0-rc1~117^2 (CTest: Re-implement test process
handling using libuv, 2017-12-10), CTest uses libuv. On Linux/sparc64
child processes have been started with non-blocking output pipes. This
can lead to write errors or lost output from children not prepared to
deal with `EAGAIN` on stdout or stderr.
Fix this for now by switching libuv back to fcntl/O_NONBLOCK to set and
clear O_NONBLOCK when compiled on Linux/sparc64.
LibUV-Issue: 1830
Fixes: #17941
This enables cross-reference syntax for CMake environment variables:
:envvar:`SOMEVAR`
and definition of CMake environment variables via a directive:
.. envvar:: SOMEVAR
It also adds environment variables defined by the directive and by
`Help/envvar/SOMEVAR.rst` documents to the index.
This `envvar` role and directive is defined in our `cmake` domain
and overrides the equivalent `envvar` role and directive provided
by Sphinx in its default domain. This is okay because we build
CMake documents in the `cmakd` domain.
This follows up the work from commit v3.10.0-rc1~43^2 (Help: Document
CMake's environment variables, 2017-09-01) that originally added
`envvar` documentation.
Implement it on Linux, FreeBSD, and Windows for now, and fail with
UV_ENOTSUP on other platforms.
Backported from upstream libuv PR 1527, scheduled for inclusion
in libuv 2.0.
Implement it on Linux, FreeBSD, and Windows for now, and return
UV_ENOTSUP on other platforms.
Backported from upstream libuv PR 1527, scheduled for inclusion
in libuv 2.0.
Extend our hack section of mappings to work around IWYU incorrectly
requiring:
* bits/stdint-uintn.h for stdint.h
* bits/stdint-intn.h for stdint.h
* bits/types/mbstate_t.h for wchar.h
b5e21d7d CTest: Re-implement test process handling using libuv
fcebff75 cmProcess: Use explicit enum for process exit exception
3dd2edf4 cmProcess: Use explicit enum for process state
5238e6db cmProcess: Remove unused ReportStatus method
c13b68e6 cmCTestRunTest: Modernize constructor and destructor decls
4d6b0903 cmCTestRunTest: Drop unused members
05da65bc cmCTestMultiProcessHandler: Factor out duplicate test finish logic
dd945345 cmCTestMultiProcessHandler: Add helper to make libuv use SA_RESTART
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1455
BSD `signal(2)` semantics make some system calls (e.g. for `write`)
restartable when interrupted by a signal handler. Use `SA_RESTART` to
enable these semantics everywhere that supports them.
This is required by C++ stream libraries that interpret `EINTR` as any
other error, set `badbit`, and stop writing. I've observed this with
`libstdc++` during a `std::cout.flush()` call interrupted by `SIGCHLD`.
This commit continues the refactoring of CTest to adopt std::chrono.
After the last sets of changes that introduced std::chrono::steady_clock
and std::chrono::system_clock respectively, it makes sense to have all
the timeouts be stored as std::chrono::duration.
No functional change intended.
IWYU incorrectly classifies this internal STL type as not internal, and
suggests including `<type_traits>` for it. Work around the problem by
mapping the offending names to a file that we always include.
See include-what-you-use issue 434.
IWYU incorrectly classifies this internal STL type as not internal, and
suggests including `<type_traits>` for it. Work around the problem by
mapping the offending names to a file that we always include.
See include-what-you-use issue 434.
Update the prebuilt binary build configurations for machines where
we build our own OpenSSL library to use a newer version.
Now that we require pthreads for libuv anyway, we can use OpenSSL 1.1
along with its dependency on pthreads.
Switch to the MSVC static runtime library (and static UCRT).
Link Qt statically, including the Windows platform plugin.
Disable the Qt tests because they are incompatible with a
Qt using a static runtime library.
Some are user facing.
Found using
codespell -q 3 --skip="./Utilities" -I .cmake-whitelist.txt`
whereby the whitelist contained:
ans
dum
helpfull
emmited
emmitted
buil
iff
isnt
nto
ot
pathes
substract
te
todays
upto
whitespaces
- sed on Mac does not support embedded sed statements, hence eliminating
the non-matches via grep
- xargs on Mac does not support -d, but does support -0, hence replacing
The SDK for macOS 10.13 adds `futimens` and `utimensat` so our checks
for these symbols may pass. However, the symbols are not available at
runtime on older macOS versions. Instead on macOS we can check for
availability based on the deployment target version.
Issue: #17101
On UNIX, build only the parts of libuv we need for the filesystem,
process, and poll abstractions using the POSIX poll() backend. This
avoids many platform-specific conditions. On Windows, build all of
libuv; there are no conditional alternatives anyway.
The scanbuild analysis cannot see that decodeUnicodeEscapeSequence
either initializes the `unicode` argument or returns `false` such
that the code following it runs only if `unicode` is initialized.
Add an explicit initialization to pacify it.
Even though we disable warnings when building jsoncpp itself, including
its headers from other CMake sources may still cause warnings.
Additional work will be needed to port CMake to newer jsoncpp interfaces
while still supporting jsoncpp 1.0.0. For now, just suppress the
markup.
note: this depends on
- a suitable flex version in PATH (currently 2.6.4)
- a suitable version of 'sed' in PATH (e.g. GNU sed)
Signed-off-by: Matthias Maennich <matthias@maennich.net>
Since commit v3.8.0-rc2~28^2~2 (Utilities/Sphinx: Port cmake extension
to Sphinx 1.4, 2017-02-09) we use the `sphinx.version_info` tuple.
However, it was added in Sphinx v1.2 so the check breaks compatibility
with older versions. Revise our check to assume Sphinx pre-1.2 if the
version tuple does not exist.
cf0ae55d server: Add support for connections that aren't event based
5ddfb6a4 server: Add connection as part of a request
d4f5d35c server: Refactor to make the event loop owned by server object
5acbf08b Tests: Teach Server test to forward exit code from server process
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !552
* upstream-curl:
curl 2017-06-14 (54b636f1)
Resolve a logical conflict in `Utilities/cmcurl/CMakeLists.txt`
by disabling CA bundle/path detection for build within CMake.
CMake already handles locating a CA bundle/path at runtime.
The checks fail even on compilers that support the keywords because
the linkage is broken:
src.c:...: undefined reference to 'test'
At the actual use sites we use `static inline` instead of just `inline`,
so perform the check this way too to fix the linkage.
Restore settings to match what we had before resolving conflicts in the
latest update. Use native APIs on Windows and Apple. Pass CA
bundle/path options.
* upstream-curl:
curl 2017-04-19 (d957e218)
Resolve conflicts in `CMakeLists.txt` in favor of the upstream version.
We will re-apply our logic as needed in following commits.
50dd15af QtDialog: block include-what-you-use
f3e21613 cmServer: include what you use
9535823b IWYU: map system symbols to libuv
6a91ee02 IWYU: add mapping for cm::auto_ptr
7165065f cmInstalledFile: add cmConfigure.h as first #include
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !811
Previously we made the `documentation` target depend on the executable
targets. There is no real reason to do this other than serializing the
documentation build output in terminals. Move this dependency behind an
undocumented option so that it is not on by default.
The KWSys `.gitattributes` file now defines custom attributes.
Git does not support these in a subdirectory where we are about
to place the content, so comment them out during import.
This also ensures that the `our-c-style` attribute on KWSys
sources does not activate the `format.clang-format` attribute
on the third-party import branch.
Provide a helper function that import scripts can use when the
third-party project defines custom Git attributes in its top-level
`.gitattributes` file. These must be commented out because Git
does not support custom attributes in a subdirectory where we
where the third-party project is about to be merged.
Update our release scripts to fetch `refs/stage/master/head` from
the `gitlab.kitware.com` repository. This will allow us to prepare
releases from staged commits before merging them to `master` or
`release`.
Backport upstream libarchive commit 70f497f456 (As per Cryptographic
Requirements, 2017-03-19). Discard more bytes of the RC4 keystream
to reduce the possibility of non-random bytes.
Update our release scripts to fetch from the gitlab.kitware.com
repository instead of the cmake.org repository. Revise our
mapping of special branch names to account for the refs that
now store them in the new repository.
Teach Sphinx and our own install rules to skip a `Help/dev` directory.
This will give us a place to put developer-only documentation that
should not be included in the user-facing documentation. Add a
placeholder README.
When compiling KWIML tests with `-Werror=format-security` we get
error: -Wformat-security ignored without -Wformat
Therefore we should disable both `format` and `format-security`
together.
This was added upstream but does not make sense in CMake because we
may replace the library with a logical target name that will not
work inside a `try_compile`.
d49176e9 libarchive: Avoid using isblank
ce8f117f libarchive: Avoid declaration after statement in C code
e0f725f8 libarchive: Fix use of ssize_t in archive_entry.h
ae4861ec libarchive: Define __LA_DEPRECATED consistently
fecb70dd Update CMake pre-cached values for libarchive 3.3.0
a59a7ee9 Merge branch 'upstream-LibArchive' into update-libarchive
c206211a LibArchive 2017-02-19 (100ee75a)
cdce7c61 libarchive: Update script to get 3.3.0
d5f39a56 clang-format.bash: Use Git attributes to mark files for formatting
f6986ee4 Define a custom Git attribute to mark sources using our C style
2256c3a7 Define a custom Git attribute to mark source files as generated
Upstream libarchive now defines this macro in two places with the same
logic in both. However, CMake's bundled copy disables this macro, so
we need to update the new location of its definition to be consistent.
Add `.clang-format` configuration files for Cuda test directories that
use `Standard: Cpp11`. Otherwise clang-format splits the triple angle
brackets used for CUDA kernels.
30abf145 Help: Fix cmake code block warnings produced by Sphinx 1.4
97917900 Utilities/Sphinx: Port qthelp css workaround to Sphinx 1.4
971384c2 Utilities/Sphinx: Port cmake extension to Sphinx 1.4
The `default.css` static content is no longer placed in the qthelp
`_static` directory. If it does not exist, skip over it and insert
the content of `basic.css` directly into `cmake.css`.
Sphinx 1.4 introduced a breaking change to `indexnode` by changing
the length of a tuple. Teach our extension to produce a tuple of
the proper length for the version of Sphinx in use.
This gets rid of the "4 column based index found" warning.
Leave the option undocumented since it is not for general use. We can
simply pass it through `SPHINX_FLAGS` when building for publication on
`cmake.org`.
Define `_WINSOCKAPI_` blank rather than to 1 in order to match the
value used by Microsoft's winsock header files.
Backported from upstream curl commit 192466e0 (cmake: Fix passing
_WINSOCKAPI_ macro to compiler, 2017-01-09).
Fixes: #16545
GitSetup upstream added an attribute to export `.gitattributes` so that
importing snapshots into the sources of other projects would bring along
the attributes. However, we don't want to export them from CMake. Drop
`.gitattributes` entries not relevant to CMake.
3a97a371 VS: Port Visual Studio Setup third-party header to older VS versions
c93e85d8 VS: Use Visual Studio Installer to locate VS 2017
18c8278b VS: Add helper class to interact with Visual Studio Installer
d47bda00 VS: Fix VS 2017 Windows Store toolset selection
efdfc26e VS: Drop check for VS 15 Express Edition
ad5b702c VS: Port Visual Studio Setup third-party header to MinGW
def7395f VS: Add Visual Studio Setup third-party header
The Visual Studio Setup team releases a `Setup.Configuration.h` header
under the MIT License for use by external applications to interact with
the Visual Studio Installer tool [1]. Import it into our source tree
for use by CMake.
[1] https://github.com/microsoft/vs-setup-samples
df7fa47c curl: Disable symbol hiding logic in build for CMake
f8a1ba20 Merge branch 'upstream-curl' into update-curl
93cc249f curl 2016-11-02 (3c561c65)
25d7b1ca curl: Update script to get curl 7.51.0