| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| |
| |
| |
| |
| | |
5db3aac1 Meta: replace empty-string assignments with `clear()`.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1276
|
| | |
|
|/
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Changes done via `clang-tidy` with some manual fine-tuning
for the variable naming and `auto` type deduction
where appropriate.
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
18454ea4 cmake: Fix --find-package mode with imported targets
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1208
|
| |
| |
| |
| |
| |
| |
| |
| | |
The change in commit v3.9.0-rc1~116^2~6 (cmakemain: use script role for
-P, 2017-05-11) accidentally left project commands out of find-package
mode, causing packages that provide imported targets to break.
Fixes: #17124
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
190e3825 Replace C-style casts
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1176
|
| | | |
|
|/ /
| |
| |
| | |
Also remove `#include "cmConfigure.h"` from most source files.
|
| | |
|
|/
|
|
|
|
|
| |
The libuv library provides many useful platform abstractions and better
process management than KWSys. We'd like to use it everywhere instead
of just in the server mode. Drop the `CMAKE_USE_LIBUV` option and use
libuv everywhere except during bootstrap.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Windows, libuv's one-time initialization changes the C runtime
library's `_fmode` setting to `_O_BINARY`, thus causing files to open
as binary after that instead of the default `_O_TEXT` mode. See
upstream libuv issue 840. Work around the problem by performing libuv
initialization early and then restoring `_fmode`.
In particular, this currently affects server mode. Without this fix,
the `_fmode` setting changes when the server mode initializes libuv.
Fixes: #16962
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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'
|
|
|
|
|
|
| |
Comments that indicate a special include order is necessary because
GetCurrentDirectory might get redefined are outdated. Remove those
outdated comments and use the normal ordering of includes.
|
|
|
|
|
| |
Applications which process CMake output will need to decode it as UTF-8
instead of console's codepage.
|
|
|
|
|
|
|
| |
Visual Studio's build system does not cleanly handle itself being
re-generated during the build. Teach `cmake --build` to check whether
the build system needs to be re-generated before launching the native
build tool.
|
| |
|
|
|
|
|
|
| |
Use KWSys ConsoleBuf to replace the `streambuf` on `std::cout` and
`std::cerr` so that process output can be encoded correctly for display
in a Windows console.
|
|
|
|
| |
Port dependent code to the change.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This will serve to make sure cmake actually compiles and links against
libuv.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Even in relatively small projects using `--trace` (and `--trace-expand`)
may produce a lot of output. When developing a custom module usually
one is interested in output of only a few particular modules.
Add a `--trace-source=<file>` option to enable tracing only a subset of
source files. The final output would be only from requested modules,
ignoring anything else not matched to given filename(s).
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modern editors provide plenty of ways to visually separate functions.
Drop the explicit comments that previously served this purpose.
Use the following command to automate the change:
$ git ls-files -z -- \
"*.c" "*.cc" "*.cpp" "*.cxx" "*.h" "*.hh" "*.hpp" "*.hxx" |
egrep -z -v "^Source/cmCommandArgumentLexer\." |
egrep -z -v "^Source/cmCommandArgumentParser(\.y|\.cxx|Tokens\.h)" |
egrep -z -v "^Source/cmDependsJavaLexer\." |
egrep -z -v "^Source/cmDependsJavaParser(\.y|\.cxx|Tokens\.h)" |
egrep -z -v "^Source/cmExprLexer\." |
egrep -z -v "^Source/cmExprParser(\.y|\.cxx|Tokens\.h)" |
egrep -z -v "^Source/cmFortranLexer\." |
egrep -z -v "^Source/cmFortranParser(\.y|\.cxx|Tokens\.h)" |
egrep -z -v "^Source/cmListFileLexer\." |
egrep -z -v "^Source/cm_sha2" |
egrep -z -v "^Source/(kwsys|CursesDialog/form)/" |
egrep -z -v "^Utilities/(KW|cm).*/" |
xargs -0 sed -i '/^\(\/\/---*\|\/\*---*\*\/\)$/ {d;}'
This avoids modifying third-party sources and generated sources.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The clang-format tool can do a good job formatting most code, but
well-organized streaming blocks are best left manually formatted.
Find blocks of the form
os <<
"...\n"
"...\n"
;
using the command
$ git ls-files -z -- Source |
egrep -v -z '^Source/kwsys/' |
xargs -0 pcregrep -M --color=always -B 1 -A 1 -n \
'<<[^\n]*\n(^ *("[^\n]*("|<<|;)$|;)\n){2,}'
Find blocks of the form
os << "...\n"
<< "...\n"
<< "...\n";
using the command
$ git ls-files -z -- Source |
egrep -v -z '^Source/kwsys/' |
xargs -0 pcregrep -M --color=always -B 1 -A 1 -n \
'<<[^\n]*\n(^ *<<[^\n]*(\\n"|<<|;)$\n){2,}'
Surround such blocks with the pair
/* clang-format off */
...
/* clang-format on */
in order to protect them from update by clang-format. Use the C-style
`/*...*/` comments instead of C++-style `//...` comments in order to
prevent them from ever being swallowed by re-formatting of surrounding
comments.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
This generator has been deprecated since CMake 3.3. Remove it.
Update documentation, modules, and tests to drop content specific
to this generator.
|
|
|
|
|
|
|
|
|
|
| |
Previously we did not clearly document that `--target` is only supported
to be specified once. Even worse, specifying it multiple times would
silently ignore any previously specified targets and only build the last
target.
Update the documentation to specify this. Update the implementation to
reject multiple `--target` options to prevent user errors.
|
|
|
|
|
|
|
|
| |
The --trace option is helpful, but sometimes, what you're looking for is
deep under many layers of function calls and figuring out what instance
of the function call you're looking at is tedious to determine (usually
involving patching and message()). Instead, add a --trace-expand option
to trace while expanding commands into what CMake actually sees.
|
|
|
|
|
|
|
|
|
|
| |
The VS >= 10 generators need to parse the .sln file from the build
directory to locate targets in subdirectories. This occurs after we
change the working directory to the build tree. If a relative directory
other than "." was given then we would change to it and also refer to
the .sln file location with it. Fix this by converting the build tree
to a full path always. This will also give a more informative error
message when the directory does not exist.
|
| |
|
|
|
|
| |
Allow the name to be used for something more-suitable.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is no need to duplicate these in all cmLocalGenerators.
Rename the symbols according to current conventions.
Add explicit calls to Set{Source,Binary}Directory with empty strings
in order to trigger the population of the components containers with
the current working directory in cmLocalGenerator. Having
directories set to empty is a special case in CMake, which is relied
on for the `if(CMAKE_BINARY_DIR)` condition at the end of
CMakeDetermineSystem.cmake.
|
|
|
|
| |
Match names used in CMake code.
|
|
|
|
| |
Match the names used in cmake code.
|
| |
|
| |
|
|
|
|
|
| |
This simplifies reasoning about the follow-up commit which ports
away from cmCacheManager to a class with the same method names.
|
|
|
|
|
|
| |
This topic was never tested without some follow-up commits. The
GetCacheEntryValue API returns a pointer to memory freed on return.
It will have to be revised along with the rest of the original topic.
|
|
|
|
|
| |
This simplifies reasoning about the follow-up commit which ports
away from cmCacheManager to a class with the same method names.
|
| |
|
|\
| |
| |
| | |
Resolve conflict in Source/CMakeLists.txt by taking both changes.
|