| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
* Change some functions to take `std::string` instead of
`const char*` in the following classes: `cmMakeFile`, `cmake`,
`cmCoreTryCompile`, `cmSystemTools`, `cmState`, `cmLocalGenerator`
and a few others.
* Greatly reduce using of `const char*` overloads for
`cmSystemTools::MakeDirectory` and `cmSystemTools::RelativePath`.
* Remove many redundant `c_str()` conversions throughout the code.
|
|\
| |
| |
| |
| |
| |
| | |
c85bb007 Reduce allocation of temporary values on heap.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1698
|
| |
| |
| |
| |
| | |
- Use `std::move` while inserting temporary results into vectors.
- Change `push_back` to `emplace_back` where appropriate.
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| | |
e6a80ccf Make use of std::chrono throughout every component
ff62b005 CTest: add safe conversion from cmDuration to integer types
695951bc CTest: introduce cmDuration
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1592
|
| |
| |
| |
| |
| |
| |
| |
| | |
This commit continues the changes made in CTest to support std::chrono
by
applying it throughout every component where a duration was used.
No functional change intended.
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Introduces CPACK_DEFAULT_DIRECTORY_INSTALL_PERMISSIONS
variable which adds support for functionality introduced
by CMAKE_DEFAULT_DIRECTORY_INSTALL_PERMISSIONS variable.
Fixes #17333
# Conflicts:
# Help/release/dev/cmake-default-dir-install-permissions.rst
|
|
|
|
| |
Signed-off-by: Matthias Maennich <matthias@maennich.net>
|
|
|
|
|
|
|
|
|
| |
Different CPack generators could produce checksum files with the same
name which were overwritten by each other since only package name
without extensions was used for checksum file name generation. This
patch adds package extension to checksum files to prevent collisions.
Fixes: #16840
|
|
|
|
|
|
| |
Changes done via `clang-tidy` with some manual fine-tuning
for the variable naming and `auto` type deduction
where appropriate.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Non component package generation was recursing through
symlinks while monolithic package generation did not.
This was causing component archive packages to contain
both symlink and a directory with the same name on the
same level if symlink contained files which caused errors
during extraction of such packages.
Closes #16051
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
None of these usages of `std::list` were inserting or removing elements
in the middle of the structure, so there were no benefits to using it.
Other uses were related to C pointers being stable in a list of strings
whereas in a vector of strings, small pointer optimizations could be
moved and become invalid after a modification to the hosting vector.
None of these uses modified the vector after handing out a C string to
an external store.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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'
|
|
|
|
|
|
| |
These functions just need to change the directory for a block of code
and then go back to the caller's expected location. Use
cmWorkingDirectory to ensure that all return paths are handled.
|
|
|
|
|
|
|
| |
When using the productbuild generator this lets you specify the value of
the `--component-plist` parameter when it runs pkgbuild for a component.
Fixes: #16638
|
|\
| |
| |
| |
| | |
88ecfd8b CPackIFW: Add some options
|
| |
| |
| |
| |
| |
| |
| |
| | |
New options is: DEFAULT, VIRTUAL, FORCED_INSTALLATION,
DISPLAY_NAME, DESCRIPTION and RELEASE_DATE.
Options added for both cpack_ifw_configure_component and
cpack_ifw_configure_component_group command.
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 variable CPACK_PACKAGE_CHECKSUM to activate it.
|
| |
|
| |
|
|\
| |
| |
| |
| | |
57534990 CPack: Add compatibility for incorrect CPACK_INSTALL_CMAKE_PROJECTS value
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since commit v3.6.0-rc1~339^2 (CPack: Fix CPACK_INSTALL_CMAKE_PROJECTS
SubDirectory (4th) option, 2016-02-18) we now honor the "Directory"
option of this variable. Prior to that commit the value was not used
so projects may have used a placeholder value like `.` instead of `/`.
Treat `.` the same as `/` to restore compatibility with such projects.
Fixes #16205.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Replace use of cmsys::auto_ptr with a CM_AUTO_PTR macro that maps to
our own implementation adopted from the KWSys auto_ptr implementation.
Later we may be able to map CM_AUTO_PTR to std::auto_ptr on compilers
that do not warn about it.
Automate the client site conversions:
git grep -l auto_ptr -- Source/ | grep -v Source/kwsys/ | xargs sed -i \
's|cmsys::auto_ptr|CM_AUTO_PTR|;s|cmsys/auto_ptr.hxx|cm_auto_ptr.hxx|'
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
| |
Don't leave this as cmMakefile responsibility.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
The changes in commit 47b060ae (CPackDeb: allow empty directories in
component packages, 2015-09-21), commit b58de9fe (CPack: allow packaging
of empty directories, 2015-09-21), and commit b761e90d (CPack: remove
accidental changes, 2015-09-22) regressed packaging of CMake itself.
Revert the changes until they can be revised and rebased on other
changes that make additional fixes.
|
|
|
|
|
| |
Remove changes accidentally included in commit b58de9fe (CPack: allow
packaging of empty directories, 2015-09-22).
|
| |
|
|
|
|
| |
Don't manage the lifetime of the cmMakefile with cmLocalGenerator.
|
|
|
|
| |
Inline implementation to callers.
|
| |
|
|
|
|
| |
It is required anyway, so this makes it explicit.
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
fa9eb814 cmLocalGenerator: Remove redundant path access.
1933f3d1 cmLocalGenerator: Remove redundant path conversions.
9e4b6cc2 cmState: Store computed relative paths to to current directories.
991f5e49 cmState::Snapshot: Store components for current directories.
57bdc1a2 cmState: Compute and store directory components.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/ |
|