Rolf Eike Beer
8ca2504a4d
use string_views to avoid memory allocations
2020-03-24 17:50:37 +01:00
Rolf Eike Beer
ef778d77e0
replace std::string::substr() with operations that do not allocate memory
...
Modify the original string instead of creating a new copy with substr() when it
is not used for anything else afterwards.
2020-03-23 22:41:44 +01:00
Rolf Eike Beer
48adc29721
replace "std::string::find(x) == 0" with cmHasPrefix()
2020-03-23 22:41:43 +01:00
Rolf Eike Beer
bfb69f9543
replace "substr(0, xx) ==" with cmHasPrefix()
2020-03-23 20:19:26 +01:00
Rolf Eike Beer
871bf0cc88
CPackWIXGenerator: use cmStrCat for more parts
2020-03-23 19:47:46 +01:00
Rolf Eike Beer
d6cf89c0d4
remove needless check for std::string::substr()
...
Passing npos is legal and means "rest of the string".
2020-03-23 19:47:46 +01:00
Marc Chevrier
44867a8c01
Modernize memory management
...
Update internals of various classes.
2020-03-08 16:32:44 +01:00
Brad King
2ed00e8ef8
CPack: Deprecate OSXX11 generator
...
The CPack OSXX11 generator has not had any updates since 2011 except as
part of sweeping maintenance changes. It also creates packages with a
OSXScriptLauncher binary that has only ppc and i386 architectures which
are not supported by Apple anymore. Furthermore, the generator is not
even mentioned in our documentation. Add a deprecation warning.
Fixes : #20235
2020-01-31 10:04:41 -05:00
Brad King
7bf187499f
CPack: Deprecate PackageMaker generator
...
Xcode no longer distributes the PackageMaker tools.
Add a deprecation warning when the generator is used.
Issue: #20235
2020-01-31 10:04:31 -05:00
Brad King
6f7f293562
Merge topic 'cpack-dmg-breaklongline'
...
4a3a7d5f5d CPack/DragNDrop: Fix word corruption in BreakLongLines
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !4275
2020-01-27 09:33:45 -05:00
Koray Kilinc
4a3a7d5f5d
CPack/DragNDrop: Fix word corruption in BreakLongLines
...
When the lines are wrapped the leading characters of the next word were being lost
2020-01-24 09:17:12 -08:00
Andrew Fuller
9571929701
CPack/DragNDrop: Support RTF licenses
2020-01-24 07:48:52 -08:00
Craig Scott
808888aa47
Merge topic 'cpack-custom-dmg-names'
...
6d6f4b9316 CPack/DragNDrop: Support CPACK_DMG_<component>_FILE_NAME
b53230fbee Tests: Add DragNDrop as a testable CPack generator
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !4227
2020-01-17 08:33:01 -05:00
Andrew Fuller
6d6f4b9316
CPack/DragNDrop: Support CPACK_DMG_<component>_FILE_NAME
2020-01-16 08:04:35 -08:00
Brad King
e61c2ed9ac
Merge topic 'fix-cpack-deb-description-file'
...
d491f34a5e CPack: Fix regression in DEB generator description
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !4204
2020-01-13 10:23:26 -05:00
Kyle Edwards
d491f34a5e
CPack: Fix regression in DEB generator description
...
Fixes : #20102
2020-01-10 17:22:52 -05:00
Kyle Edwards
78f9c9dd0e
Merge topic 'nsis-headerimage'
...
ebfffc609e CPack/NSIS: Add option for setting MUI_HEADERIMAGE_BITMAP
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !4157
2020-01-10 13:48:47 -05:00
Marc Chevrier
a00960288b
GlobalGenerator family: modernize memory management
2020-01-07 11:03:11 +01:00
Johnny Jazeix
ebfffc609e
CPack/NSIS: Add option for setting MUI_HEADERIMAGE_BITMAP
...
Fixes : #20120
2020-01-02 22:27:31 +01:00
Brad King
776d1e5e79
Merge topic 'win-no-error-popup'
...
a4c19cb895 Windows: Restore suppression of error report popups in CI builds
0b9f1cc96b Merge branch 'upstream-KWSys' into win-no-error-popup
9e27e52d4b KWSys 2019-11-15 (329d8c7c)
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !4052
2019-11-18 09:52:13 -05:00
Brad King
1c09b8c164
Merge topic 'cpack-custom-templates' into release-3.16
...
7d6ab5dc5b CPack: Restore support for custom package configuration templates
Acked-by: Kitware Robot <kwrobot@kitware.com >
Acked-by: Kyle Edwards <kyle.edwards@kitware.com >
Merge-request: !4054
2019-11-18 09:50:57 -05:00
Brad King
0e46dea343
Merge topic 'cpack-custom-templates'
...
7d6ab5dc5b CPack: Restore support for custom package configuration templates
Acked-by: Kitware Robot <kwrobot@kitware.com >
Acked-by: Kyle Edwards <kyle.edwards@kitware.com >
Merge-request: !4054
2019-11-18 09:50:57 -05:00
Brad King
7d6ab5dc5b
CPack: Restore support for custom package configuration templates
...
Refactoring in commit 98617f1be0 (Refactor: Move CPack internal files to
`Internal/CPack/` directory, 2019-07-09, v3.16.0-rc1~449^2) accidentally
changed the public-facing names of the templates. The name passed to
`FindTemplate` is searched in `CMAKE_MODULE_PATH` and should not change.
Remove the `Internal/CPack/` prefix on the names added by that commit.
Teach `FindTemplate` to use our builtin default directly when the
public-facing name is not found in `CMAKE_MODULE_PATH`.
Fixes : #19979
2019-11-15 10:38:08 -05:00
Brad King
a4c19cb895
Windows: Restore suppression of error report popups in CI builds
...
On Windows, libuv uses `_CrtSetReportHook` to install a handler it uses
to suppress assertions on invalid file descriptors in `_get_osfhandle`.
This removes the handler we install in CI environments to suppress
interactive popups. Move installation of our handler to after libuv is
initialized so that our handler is actually used.
Unfortunately this also removes libuv's handler and so may cause Debug
builds under CI to abort on invalid file descriptors instead of simply
converting them to `INVALID_HANDLE_VALUE`. If this becomes a problem
we may need to modify libuv to make its hook more configurable.
2019-11-15 09:23:47 -05:00
Brad King
f59ae1a698
Merge topic 'cpack-pkg-background'
...
e6069613a1 CPack: Set background image in macOS installer
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !3995
2019-11-12 09:52:32 -05:00
Craig Scott
27020c81d5
Merge topic 'remove-CPACK_INSTALL_CMAKE_CONFIGURATIONS'
...
1d1fa5d3e4 Tests: Add RunCMake.CPackCommandLine case for multi-config package
108207cc84 CPack: Remove CPACK_INSTALL_CMAKE_CONFIGURATIONS
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !4025
2019-11-12 08:16:31 -05:00
Alex Turbov
108207cc84
CPack: Remove CPACK_INSTALL_CMAKE_CONFIGURATIONS
...
In commit da5ac4bb60 (cpack: Add `CPACK_INSTALL_CMAKE_CONFIGURATIONS`
variable, 2019-07-10, v3.16.0-rc1~165^2) we added both the variable
and support for `cpack -C` with multiple configurations. Drop the
variable because the `package` target cannot ensure that all of the
configurations are built. Keep the command-line interface so that
it can be used manually in scripts.
Fixes : #19918
2019-11-11 14:15:09 -05:00
Sergey Larin
e6069613a1
CPack: Set background image in macOS installer
...
Now you can set a background image and it's parameters in
productbuild and PackageMaker based installers.
2019-11-08 14:09:25 -05:00
Brad King
0618f8b3ed
Merge topic 'cpack-nsis-welcome-finish-title'
...
68b5af65fa CPack/NSIS: Add options for custom welcome/finish titles + display on 3 lines
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !3980
2019-11-06 09:28:05 -05:00
Johnny Jazeix
68b5af65fa
CPack/NSIS: Add options for custom welcome/finish titles + display on 3 lines
...
Fixes : #11275
2019-11-05 20:09:53 +01:00
Johnny Jazeix
63c0bc9292
CPack: Ensure CPACK_PACKAGE_DIRECTORY is an absolute path
...
Fixes : #18133 , #19412
2019-11-01 10:18:33 -04:00
Kitware Robot
ed98209ddc
Revise include order using clang-format-6.0
...
Run the `clang-format.bash` script to update our C and C++ code to a new
include order `.clang-format`. Use `clang-format` version 6.0.
2019-10-01 12:26:36 -04:00
Marc Chevrier
c688b401d3
cmstd: Modernize CMake system headers
...
Provide a standardized way to handle the C++ "standard" headers
customized to be used with current CMake C++ standard constraints.
Offer under directory `cm` headers which can be used as direct
replacements of the standard ones. For example:
#include <cm/string_view>
can be used safely for CMake development in place of the `<string_view>`
standard header.
Fixes : #19491
2019-09-20 10:01:37 -04:00
Tushar Maheshwari
c9c1eb99fe
cmCPackGeneratorFactory: rule of zero
2019-09-17 13:05:26 -04:00
Brad King
1ac4e0ef1b
Merge topic 'tidy-deprecated-headers'
...
f30523d090 clang-tidy: modernize-deprecated-headers
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !3792
2019-09-16 10:25:53 -04:00
Regina Pfeifer
f30523d090
clang-tidy: modernize-deprecated-headers
2019-09-16 10:11:13 -04:00
Brad King
0b8c0b26ce
Merge topic 'cpack-wix-start-menu'
...
d69457077d CPackWIX: Allow omitting program menu folder and uninstall shortcut
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !3802
2019-09-13 09:53:41 -04:00
Alexej Harm
d69457077d
CPackWIX: Allow omitting program menu folder and uninstall shortcut
2019-09-12 15:19:01 +02:00
Regina Pfeifer
d25a5a7ec9
clang-tidy: modernize-use-auto
...
Set the MinTypeNameLength option to an impossibly high value in order
to limit the diagnostics to iterators. Leave new expressions and cast
expressions for later.
2019-09-10 22:21:41 +02:00
Brad King
ca8c3d64c8
Merge topic 'use-using'
...
1d3f5ebb0d clang-tidy: Enable check modernize-use-using
a1ddf2d0ba clang-tidy: Replace typedef with using
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !3782
2019-09-06 12:38:04 -04:00
Brad King
0d06cc457c
CPack/FreeBSD: Cleanup include-what-you-use diagnostics
2019-09-05 09:03:26 -04:00
Brad King
fcba9c3baa
Merge topic 'cpack-zstd'
...
e26f0e9dd5 CPack: Add generator for .tar.zst packages
f7085d7b0a cmCPackArchiveGenerator: Code cleanup
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !3752
2019-09-05 08:24:50 -04:00
Regina Pfeifer
e26f0e9dd5
CPack: Add generator for .tar.zst packages
2019-09-04 13:05:22 -04:00
Regina Pfeifer
f7085d7b0a
cmCPackArchiveGenerator: Code cleanup
2019-09-04 13:05:22 -04:00
Regina Pfeifer
a1ddf2d0ba
clang-tidy: Replace typedef with using
...
Automate the conversion with
perl -i -0pe 's/typedef ([^;]*) ([^ ]+);/using $2 = $1;/g'
then manually fix a few places.
2019-09-04 18:03:01 +02:00
Regina Pfeifer
62e5f72289
clang-tidy: Replace typedef with using
2019-09-03 13:21:26 -04:00
Brad King
de0a2354fc
IWYU: Add missing cstddef includes for size_t and nullptr_t
...
The IWYU tool we use for CI now diagnoses these.
2019-09-03 11:46:52 -04:00
Brad King
2e6effd2e0
Merge topic 'cpack-install-multiple-configurations'
...
da5ac4bb60 cpack: Add `CPACK_INSTALL_CMAKE_CONFIGURATIONS` variable
d4e6b2ae25 Refactor: Use `unique_ptr` instead of raw pointer
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !3533
2019-09-03 09:30:15 -04:00
Alex Turbov
da5ac4bb60
cpack: Add CPACK_INSTALL_CMAKE_CONFIGURATIONS variable
...
For the multi-configuration generators one can specify the list
of configurations to include in the package.
E.g. having a project, where debug libraries have a suffix to
distinct them from the release builds, one can build the package
containing both `Debug` and `Release` binaries.
2019-08-30 11:02:43 -04:00
Konstantin Podsvirov
9367f7dcdd
CPack/IFW: Command vectorization
...
Fixes : #19634
2019-08-27 11:30:19 -04:00