Vitaly Stakhovsky
080a79ca4a
cmSystemTools: More methods accept std::string params
2019-02-11 18:11:59 -05:00
Brad King
4b37b4f1bb
Merge topic 'modernize-for-loops'
...
01b2d6ab74 Modernize: Use ranged for-loops when possible
15bdbec017 cmAlgorithms: Make cmRange advance/retreat safe for rvalues
Acked-by: Kitware Robot <kwrobot@kitware.com >
Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de >
Merge-request: !2901
2019-02-11 08:08:22 -05:00
Brad King
9783825de5
Merge topic 'runsinglecommand'
...
65baaa0e37 cmSystemTools::RunSingleCommand: Accept std::string argument
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !2927
2019-02-08 08:47:56 -05:00
Artur Ryt
01b2d6ab74
Modernize: Use ranged for-loops when possible
...
Replaced most manual `const_iterator`-based loops and some
reverse-iterator loops with range loops.
Fixes : #18858
2019-02-07 22:39:05 +01:00
Vitaly Stakhovsky
65baaa0e37
cmSystemTools::RunSingleCommand: Accept std::string argument
2019-02-06 11:02:10 -05:00
Artur Ryt
f3534386b5
Prefer front/back/data over dereferencing begin/rbegin iter
...
Changed for sequenced containers: vector, list, string and array
2019-02-06 10:43:16 -05:00
Brad King
c30f9b1cde
Merge topic 'functional-callbacks'
...
8c92db829b MessageCallback: Remove unused bool& argument
bcee24aecc Use `std::function` for callbacks
Acked-by: Kitware Robot <kwrobot@kitware.com >
Acked-by: vvs31415 <vstakhovsky@fastmail.com >
Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de >
Merge-request: !2872
2019-01-30 08:10:27 -05:00
Brad King
bcec7d0778
Merge topic 'copyfile-stdstring'
...
c31b6e616d cmSystemTools: copy file member functions accept std::string params
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !2877
2019-01-30 08:08:59 -05:00
Brad King
d75fec5a88
Merge topic 'tidy-use-equals-default'
...
094f01d0f0 cleanup: Prefer compiler provided special member functions
55671b41d2 clang-tidy: Use `= default`
Acked-by: Kitware Robot <kwrobot@kitware.com >
Acked-by: Brad King <brad.king@kitware.com >
Merge-request: !2841
2019-01-29 14:07:24 -05:00
Vitaly Stakhovsky
c31b6e616d
cmSystemTools: copy file member functions accept std::string params
...
Cleaned up `c_str()`s.
`cmSystemTools::CopyFileIfDifferent()` removed as redundant.
2019-01-29 10:34:18 -05:00
Regina Pfeifer
bcee24aecc
Use std::function for callbacks
2019-01-29 16:32:52 +01:00
Brad King
c18fc30d1a
Merge topic 'renamefile-string'
...
9e5c13738b cmSystemTools::RenameFile: Accepts std::string args
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !2842
2019-01-25 08:00:14 -05:00
Regina Pfeifer
55671b41d2
clang-tidy: Use = default
...
Suppress some cases in `Source/cmGeneratorExpressionNode.cxx` and
`Source/cmUVHandlePtr.h` where a few older compilers require a
user-defined default constructor (with `{}`).
2019-01-25 06:44:32 -05:00
Vitaly Stakhovsky
9e5c13738b
cmSystemTools::RenameFile: Accepts std::string args
2019-01-22 20:37:59 -05:00
Regina Pfeifer
5a0784ddea
clang-tidy: Pass by value
2019-01-22 13:03:04 -05:00
Brad King
c7428e1729
Merge topic 'read-list-file'
...
25caf7bafe cmMakefile::ReadListFile() accepts std::string argument
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !2821
2019-01-21 07:57:33 -05:00
Regina Pfeifer
ef61997b1b
clang-tidy: Use emplace
2019-01-17 13:12:02 -05:00
Vitaly Stakhovsky
25caf7bafe
cmMakefile::ReadListFile() accepts std::string argument
...
Same for cmMakefile::ReadDependentFile(); some cleanup
2019-01-17 12:36:07 -05:00
Kyle Edwards
4568d046c4
Properties: Add CMAKE_ROLE global property
...
This property allows scripts to determine whether they're in project
mode, script mode, find-package mode, CTest, or CPack.
2019-01-17 09:44:29 -05:00
Sean McBride
b056bc3425
Fix most clang -Wextra-semi-stmt warnings in C++ files
...
Suppress one in code generated by flex.
2019-01-15 14:09:46 -05:00
Regina Pfeifer
414aa6c81e
clang-tidy: Simplify boolean expressions
2019-01-15 11:40:25 -05:00
Brad King
cd0881be61
IWYU: Update CMake code for IWYU built with Clang 6
...
IWYU now correctly requires `<utility>` for `std::move`. It also
requires a container header when used via a range-based for loop.
2019-01-15 10:00:50 -05:00
Vitaly Stakhovsky
94632087b2
Add missing override
2018-12-30 12:32:55 -05:00
Brad King
d99e1cca20
Merge topic 'cpack-status-callback'
...
4a3ae1710e CPack/External: Fix status messages of staging scripts
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !2696
2018-12-10 08:17:06 -05:00
Nils Gladitz
4a3ae1710e
CPack/External: Fix status messages of staging scripts
...
Set progress callback on cmake instance used by CPack. The progress
callback is used to output STATUS messages which are otherwise missing
when issued from e.g. CPack External staging scripts.
Fixes : #18567
2018-12-07 07:33:30 -05:00
Regina Pfeifer
a816fe298d
cmCPackFreeBSDGenerator: fix clang-tidy issues
...
Install FreeBSD's libpkg on Linux and configure CMake with
CPACK_ENABLE_FREEBSD_PKG and CMake_RUN_IWYU set to ON.
Then, fix all warnings.
2018-12-06 19:45:24 +01:00
Brad King
81bea69bd1
Merge topic 'productbuild-encode-pkg-url-ref'
...
7954ba9bc1 productbuild: escape pkg-ref urls
652210e901 cmSystemTools: Add EncodeURL helper
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !2681
2018-12-06 09:06:13 -05:00
Brad King
7954ba9bc1
productbuild: escape pkg-ref urls
...
Inspired-by: James Goruk <james.goruk@gmail.com >
Fixes : #18645
2018-11-28 14:27:32 -05:00
Guillem Jover
38e75bb3c6
CPack/Deb: Remove paxr as a supported tar format for a .deb
...
The only format supported from the ones available within cpack is
gnutar, which supports large numbers encoded in base-256, and long
filenames and linknames. PAX is not and has never been a supported
format by dpkg.
Fixes : #18620
2018-11-28 09:31:28 -05:00
Brad King
772edffbf0
Merge topic 'readability-static-accessed-through-instance'
...
3e60580784 clang-tidy: Fix readability-static-accessed-through-instance
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !2647
2018-11-28 09:07:45 -05:00
Brad King
cb6229b8b8
clang-tidy: fix warnings in macOS-only code
2018-11-27 13:20:34 -05:00
Regina Pfeifer
3e60580784
clang-tidy: Fix readability-static-accessed-through-instance
...
Enable the check in .clang-tidy and fix all warnings.
2018-11-22 00:11:37 +01:00
Robert Maynard
f29e2292c9
cpack: When given an unknown generator print out all valid generators
...
This makes cpack behavior match cmake when passed an invalid generator
2018-11-08 19:07:24 -05:00
Robert Maynard
eba7273c20
cpack: Better error message when generator doesn't exist.
...
Currently the CPack error message when passed an invalid generator
name reads like the generator failed to work, rather than the
name was invalid.
2018-11-08 09:32:18 -05:00
Craig Scott
20d5e77a27
CPack: Rename Ext generator to External
...
Ext and External were used inconsistently in the code and the
docs. This change converts all uses of Ext to External, including
within variable names used by the generator.
2018-11-05 07:56:03 -05:00
Andrew Fuller
d8a3939aef
CPack/Deb: Add ability to split out debug symbols into .ddeb package
2018-09-21 20:19:31 +00:00
Craig Scott
2c154fec6b
Warnings: Remove unused variables
2018-09-11 10:20:35 +08:00
Nils Gladitz
4a0f664aaf
CPackExt: Add CPACK_EXT_ENABLE_STAGING and CPACK_EXT_PACKAGE_SCRIPT
...
CPACK_EXT_ENABLE_STAGING enables optional staging
and CPACK_EXT_PACKAGE_SCRIPT allows to specify an optional
script file that can package staged files via an
external packaging tool.
Issue: #18236
2018-08-14 08:37:03 +02:00
Brad King
75844dd609
Merge topic 'cleanup-find-cstr'
...
69ca85cc7f Remove unnecessary c_str() in RegularExpression::find calls
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !2271
2018-08-09 08:00:03 -04:00
Vitaly Stakhovsky
69ca85cc7f
Remove unnecessary c_str() in RegularExpression::find calls
2018-08-07 15:28:24 -04:00
Sebastian Holtermann
b6802cd506
cmGeneratedFileStream: clang-tidy applied to remove redundant `c_str` calls
...
After changing the ``cmGeneratedFileStream`` methods to accept
``std::string const&`` instead of ``const char*`` we don't
need to call ``std::string::c_str`` anymore when passing
a ``std::string`` to a ``cmGeneratedFileStream`` method.
This patch removes all redundant ``std::string::c_str``
calls when passing a string to a ``cmGeneratedFileStream`` method.
It was generated by building CMake with clang-tidy enabled using
the following options:
-DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy-4.0;-checks=-*,readability-redundant-string-cstr;-fix;-fix-errors
2018-08-07 17:02:39 +02:00
Muhammad Ismail Soboute
496d22b8cc
productbuild: Capture stderr too in CPackProductBuild logs
...
Stdout and stderr will be merged.
Fixes : #18234
2018-08-06 21:27:51 +10:00
Sylvain Joubert
22fbf39d9b
CPack: Fix log typos (spaces in the wrong places)
2018-07-18 17:15:52 +02:00
Lars Schmertmann
f2134169f6
WiX: Add the build directory to IncludeSearchPaths for candle.exe
...
CPack creates cpack_variables.wxi in the build directory. In the WiX
template it can be used by <?include "cpack_variables.wxi"?> because
the template is configured into main.wxs in the build directory.
Because the extra source files are in the source directory it was necessary to use
<?include "$(sys.CURRENTDIR)_CPack_Packages\win32\WIX\cpack_variables.wxi"?>.
This requires knowledge about the build directory structure and
is avoided by this change by adding the build directory to the IncludeSearchPaths.
2018-07-12 08:48:33 +02:00
Brad King
c4b1c0751d
Merge topic 'cpack-external'
...
4c71548766 Help: Add release notes for CPack External generator
47c87cdd1f Help: Add documentation for CPack External generator
2ef966bc77 Testing: Add test for CPack External generator
80914d88da CPack: Add "CPack External" generator
3ced881db6 cmCPackGenerator: Store CPACK_INSTALL_CMAKE_PROJECTS in an internal field
4938abb600 cmCPackGenerator: Refactor InstallProjectViaInstallCMakeProjects()
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !2142
2018-07-03 10:55:06 -04:00
Brad King
83db42fa99
Merge topic 'cpack-fix-deb-packaging'
...
2774259100 CPack/Deb: Restore setting of root as the owner of files
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !2178
2018-07-03 10:48:03 -04:00
Andrew Fuller
2774259100
CPack/Deb: Restore setting of root as the owner of files
...
Refactoring in commit v3.10.0-rc1~220^2 (cmCPackDebGenerator: Use
libarchive to create .deb file) accidentally broke this for the
top-level archive.
2018-07-02 13:17:43 -04:00
Kyle Edwards
80914d88da
CPack: Add "CPack External" generator
...
This generator doesn't actually package the files. Instead, it
provides a metadata JSON file that can be used by external packaging
software to do its own packaging. This JSON file provides information
about the components, component groups, installation types, and CMake
projects.
2018-07-02 09:51:02 -04:00
Kyle Edwards
3ced881db6
cmCPackGenerator: Store CPACK_INSTALL_CMAKE_PROJECTS in an internal field
...
By storing this information in an internal field in the class, it
can be used later on by generators that need it.
2018-07-02 09:51:02 -04:00
Kyle Edwards
4938abb600
cmCPackGenerator: Refactor InstallProjectViaInstallCMakeProjects()
...
This refactoring will allow cmCPackExtGenerator to skip the install
step while still gathering up information about the CPack components
and groups. Besides, this function was too long, and needed to be
broken up anyway.
2018-07-02 09:51:02 -04:00