| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Override the KWSys GetRealPath on Windows and use uv_fs_realpath first
to resolve symbolic links.
Fixes: #17206
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The KWSys `SystemTools::SplitProgramFromArgs` implementation goes into
an infinite loop when the value is just " " (a space). Since the
"program path with unquoted spaces plus command-line arguments"
operation it is trying to provide is poorly defined (string parsing
should not depend on filesystem content), just stop using it.
Instead consider the main two use cases the old approach tried to handle:
* The value is the name or absolute path of a program with no quoting
or escaping, but also no command-line arguments. In this case we
can use the value as given with no parsing, and assume no arguments.
* The value is a command-line string containing the program name/path
plus arguments. In this case we now assume that the command line
is properly quoted or escaped.
Fixes: #17262
|
|
|
|
| |
Also remove `#include "cmConfigure.h"` from most source files.
|
| |
|
|
|
|
|
|
|
| |
* Use a parameter to select hash algorithm
* Return a std::string as result or an empty
string if it fails
* Avoids unnecessary copy of hash value
|
|\
| |
| |
| |
| |
| |
| | |
594d3d6f Ninja: support response file for cmake_ninja_depends on Windows
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !722
|
| |
| |
| |
| |
| |
| |
| | |
The internal tool "cmake_ninja_depends" now supports reading the list of ddi
files from a reponse file to circumvent Windows command line length limits.
Use this response file for dyndep rule on Windows.
|
| | |
|
|/
|
|
| |
Also, make the destructor non-virtual.
|
|
|
|
|
|
| |
Move the logic to cmSystemTools to be shared among the generators.
Revise the implementation and add comments justifying each possible
source for a limit.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Automate with:
git grep -l '#include <cm_' -- Source \
| xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g'
git grep -l '#include <cmsys/' -- Source \
| xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g'
git grep -l '#include <cm[A-Z]' -- Source \
| xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
Add support for natural string order by comparing non-numerical
character directly and numerical number by firstly collecting contiguous
digits. The order is defined by the `strverscmp(3)` manual [1].
[1] http://man7.org/linux/man-pages/man3/strverscmp.3.html
Inspired-by: Pierluigi Taddei <pierluigi.taddei@gmail.com>
|
| |
|
|
|
|
|
| |
This adds the LESS_EQUAL, GREATER_EQUAL, and associated STR and VERSION
equivalents to use the combined <= and >= functionality.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
The Debian package checker tool (lintian) detected several typos in
CMake.
|
|
|
|
|
|
| |
The OUTPUT_NORMAL value is not really "normal" and has only one caller.
Rename it to OUTPUT_FORWARD to clarify that we are explicitly forwarding
the output.
|
|
|
|
| |
Wrap a call to VersionCompare with OP_EQUAL.
|
|
|
|
|
| |
Wrap a call to VersionCompare with OP_GREATER in a signature suitable
for use with std::sort.
|
|
|
|
|
| |
This executable comes with CMake so just compute its location in
cmSystemTools instead of storing it in compiler information modules.
|
|
|
|
| |
It has no callers and we can inherit one from KWSys SystemTools anyway.
|
|
|
|
|
| |
Add the PackageCertificateThumbprint property when there is a
certificate on a WindowsStore or Phone app.
|
|
|
|
| |
Move it out of cmSystemTools and into cmOutputConverter.
|
|
|
|
| |
Convert a string to an unsigned integer and reject any extra input.
|
|
|
|
|
|
|
| |
Extend the RunSingleCommand signature to capture stdout and stderr
separately. Allow both to be captured to the same std::string
to preserve existing behavior. Update all call sites to do this
so that this refactoring does not introduce functional changes.
|
|
|
|
|
|
|
| |
Allows specifying a libarchive defined archive format currently restricted to
7zip, gnutar, pax, paxr and zip.
The default is "paxr" (pax restricted).
|
|
|
|
|
|
| |
Build the needed infrastructure during bootstrap in order to allow
"cmake -E cmake_echo_color" to be used unconditionally during
generation.
|
|
|
|
|
|
|
|
|
|
| |
Add an option to set the mtime of entries in a tarball so that one can
create a tarball with a consistent content hash (e.g. MD5) for a given
set of files regardless of their current timestamps on disk. This will
be useful for submission of tarballs to CDash, which tracks content
hashes to avoid duplication.
Inspired-by: Bill Hoffman <bill.hoffman@kitware.com>
|
|
|
|
| |
Juggling 3 booleans was unwieldy.
|
| |
|
|
|
|
|
|
|
|
|
| |
Convert the StringToInt helper into a StringToLong helper with a 'long'
result type. This will make the helper more useful to other callers
that want to use strtol.
While at it, also check errno after calling strtol in case the
conversion fails with a range error.
|
|
|
|
|
|
| |
Convert a string to a signed integer and reject any extra input.
Co-Author: Rolf Eike Beer <eike@sf-mail.de>
|
|
|
|
|
|
|
|
|
| |
Factor a common callback type out of StdoutCallback. Add an equivalent
StderrCallback. While at it, use "size_t" for the data length instead
of "int".
Teach "ctest --build-and-test" to capture the Stderr callback because
output sent through it is part of the logical CMake process output.
|
|
|
|
|
| |
Clarify that it is the callback for the cmSystemTools::Message API.
Rename callback clients too.
|
|
|
|
|
|
|
|
|
|
|
| |
Casts from std::string -> cmStdString were high on the list of things
taking up time. Avoid such implicit casts across function calls by just
using std::string everywhere.
The comment that the symbol name is too long is no longer relevant since
modern debuggers alias the templates anyways and the size is a
non-issue since the underlying methods are generated since it's
inherited.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Several CMake operations need to replace files in rapid succession.
This commonly fails on Windows due to filesystem lock behavior so
we have retry loops. No matter how many times we retry or how long
we delay there will inevitably be someone with an environment that
needs more. Make the retry count and delay configurable in the
Windows Registry keys:
{HKCU,HKLM}/Software/Kitware/CMake/Config
in DWORD values
FilesystemRetryCount = Number of tries
FilesystemRetryDelay = Delay in milliseconds between tries
Leave the feature undocumented for now to see how it goes.
|
|
|
|
|
| |
Add a method to print a command line for human reference by simply
double-quoting every argument.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename cmSystemTools::FindExecutableDirectory to FindCMakeResources.
Teach it to compute the locations of cmake, ctest, cpack, ccmake, and
cmake-gui executables, and the location of CMAKE_ROOT. Provide this
information from static cmSystemTools::Get<resource>() methods.
Refactor code that needs these locations to use the new APIs.
Teach FindCMakeResources to use the OS X system API to lookup the
executable location. When running from the CMake build tree itself,
leave a file in the tree that FindCMakeResources can use to read the
location of the source tree. This avoids the need to compile the source
tree location into a binary that may be installed and used without the
source tree.
Teach the QtDialog on OS X to create a "cmake-gui" symlink in the build
tree next to "cmake" and the other tools, as is already done in the
install tree for the application bundle. This ensures a consistent set
of executables are available in one directory.
|
|
|
|
|
| |
All calls to this method have been replaced by newer infrastructure.
Remove it and the supporting cmWin32ProcessExecution class.
|