Commit Graph

944 Commits

Author SHA1 Message Date
Fritz Elfert
267de3ba30 CPack/WiX: Add support for custom XML namespaces
Add a `CPACK_WIX_CUSTOM_XMLNS` option to specify these.

Fixes: #21098
2020-08-18 07:50:49 -04:00
Vitaly Stakhovsky
f37c14e930 Source: use cmNonempty() 2020-07-28 08:31:31 -04:00
Vitaly Stakhovsky
8ef18e8525 Clean a few string conversions 2020-07-09 09:42:00 -04:00
Brad King
1ace607329 CPack/DragNDrop: Re-implement SLA attachment to avoid deprecated tools
The `Rez` tool has been deprecated since Xcode 6.  The `hdiutil flatten`
and `hdiutil unflatten` tools have been deprecated since macOS 10.15 and
are removed in macOS 11.  Instead use `hdiutil udifrez` to attach the
SLA resources to disk images.  This tool accepts XML input files, so
convert our resource file generation to produce that format.

Fixes: #20889
2020-07-07 08:08:21 -04:00
Brad King
977f5ed3d1 Merge topic 'restore-cwd-translation-map'
85a945a607 Restore handling of build directory inside a symlinked path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4963
2020-07-03 07:25:31 -04:00
Brad King
85a945a607 Restore handling of build directory inside a symlinked path
In commit dd8365b3f1 (Merge branch 'upstream-KWSys' into update-kwsys,
2020-04-06, v3.18.0-rc1~397^2) we imported KWSys commit `019afb6ea`
(SystemTools: Drop GetCurrentWorkingDirectory 'collapse' argument,
2020-04-03).  That caused `GetCurrentWorkingDirectory` to no longer send
paths through the KWSys translation map and broke CMake's detection of
the absolute path to a build directory containing a symbolic link.
Add our own `cmSystemTools::GetCurrentWorkingDirectory` wrapper around
the KWSys method in order to restore that mapping.

Test-case-by: Ben Boeckel <ben.boeckel@kitware.com>
Issue: #16228
Fixes: #20900
2020-07-02 07:33:16 -04:00
Rahul Gottipati
27b03281e2 configure_file: Add option to control file permissions transfer to copy
Issue: #20866
2020-06-30 11:20:41 -04:00
Alex Turbov
915409af49 CPack: Introduce pre- and post- build actions
CPack learned the `CPACK_PRE_BUILD_SCRIPTS`, `CPACK_POST_BUILD_SCRIPTS`,
and `CPACK_PACKAGE_FILES` variables.

The first two are lists of scripts to perform
- after pre-install files into a staging directory and before
  producing the resulting packages
- after produsing the packages

The post-build script(s) also get the list of actually produced
packages in the `CPACK_PACKAGE_FILES`.

Issue: #19077
2020-06-15 11:06:41 -04:00
Alex Turbov
a6e1b20bab CPack External: Introduce CPACK_EXTERNAL_BUILT_PACKAGES
The `CPACK_EXTERNAL_PACKAGE_SCRIPT` script may set this list variable to the
full paths of generated package files. CPack copy these files from the stage
directory back to the top build directory and possibly produce checksum files
if the `CPACK_PACKAGE_CHECKSUM` is set.
2020-06-05 08:56:32 -04:00
Vitaly Stakhovsky
1e805f53f5 GetDefinition: avoid duplicate calls 2020-05-29 13:12:22 -04:00
Marc Chevrier
2faa3f6c55 Refactoring: Third-parties public headers are under cm3p prefix
Fixes: #20666
2020-05-07 12:06:08 +02:00
Kyle Edwards
3ffd2741c1 CPack: Fix newline output in .deb generator
When running CPack on Windows, LF newlines are converted to CRLF
unless binary mode is used. Use binary mode whenever possible.

Fixes: #20659
2020-04-30 10:58:22 -04:00
Ben Boeckel
24a9fed5d9 IWYU: mark <cstddef> as needed
Newer IWYU is not seeing them as needed for `size_t`.
2020-04-29 11:16:44 -04:00
Brad King
fb5d24fa3c Merge topic 'cpack-symlinks'
bcc5cd44ed CPack: Do not recurse through directory symlinks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4637
2020-04-22 08:30:53 -04:00
Brad King
bcc5cd44ed CPack: Do not recurse through directory symlinks
Extend the fix from commit 7b8dcdd173 (CPack: Do not recurse through
directory symlinks (#12284), 2011-08-27, v2.8.6~55^2) to more places in
CPack.

Issue: #12284
2020-04-21 07:28:06 -04:00
Marc Chevrier
aacd4e4a90 Refactoring: add cm::contains to <cmext/algorithm> 2020-04-17 10:00:03 +02:00
Brad King
4f7d16c68f Merge topic 'cpack-nsis-dpi-aware'
d6840a4f3c CPack/NSIS: Add option for setting DPI-aware

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4607
2020-04-15 09:50:49 -04:00
Johnny Jazeix
d6840a4f3c CPack/NSIS: Add option for setting DPI-aware
See https://nsis.sourceforge.io/Reference/ManifestDPIAware
for more information.

Fixes: #17724
2020-04-14 13:47:49 +02:00
Ben Boeckel
f2a33107be clang-tidy: address bugprone-branch-clone lints
Arguably, many of these are bugs in `clang-tidy`. An if/else tree with
other conditionals between cloned blocks may be relying on the
intermediate logic to fall out of the case and inverting this logic may
be non-trivial.

See: https://bugs.llvm.org/show_bug.cgi?id=44165
2020-04-13 11:26:02 -04:00
Brad King
f0a27e44f3 Merge topic 'parallel-lzma-compression'
b3bacf0152 cmCPackArchiveGenerator: support multithreaded compression
b71d385ed4 cmCPackArchiveGenerator: support setting archive options
948aa8bd1c cmArchiveWrite: support setting archive filter options
b9c17de023 cmArchiveWrite: split out opening the file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Cristian Adam <cristian.adam@gmail.com>
Merge-request: !3195
2020-04-06 08:28:19 -04:00
Brad King
56cccde235 cmWorkingDirectory: Add GetOldDirectory method 2020-04-03 09:55:49 -04:00
Brad King
753817e71d CPack/FreeBSD: Use RAII to save/restore working directory 2020-04-03 09:55:49 -04:00
Ben Boeckel
b3bacf0152 cmCPackArchiveGenerator: support multithreaded compression 2020-04-03 07:35:35 -04:00
Brad King
4e69c9d8d8 Merge topic 'cpack-nsis-version'
aa78a2537c CPack/NSIS: Document and check requirement of at least NSIS 3.0

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4552
2020-04-01 10:43:25 -04:00
Ben Boeckel
b71d385ed4 cmCPackArchiveGenerator: support setting archive options 2020-03-31 11:08:32 -04:00
Ben Boeckel
b9c17de023 cmArchiveWrite: split out opening the file
This allows options to be set before the "header" phase of libarchive's
API.
2020-03-31 11:08:32 -04:00
Brad King
aa78a2537c CPack/NSIS: Document and check requirement of at least NSIS 3.0
Since commit 9d2816544e (CPack/NSIS: Also preload the "UserInfo.dll"
plugin, 2020-01-04, v3.17.0-rc1~204^2) we require NSIS 3.0.  Since
older versions do not support Windows 8 or above, we can now require
at least version 3.0.

Fixes: #20514
2020-03-31 10:57:28 -04:00
Brad King
577fc3ef19 Merge topic 'string-prefix'
ec7928ef26 use _s to construct static string_views at several places
94de927cab VS10Generator: avoid many string allocations
8ca2504a4d use string_views to avoid memory allocations
761f1adcae check for a valid URL scheme before starting to do any splitting
ef778d77e0 replace std::string::substr() with operations that do not allocate memory
77616f4681 pass cm::string_view to cmVisualStudioSlnParser::ParseTag()
ada6a3226f use cm::string_view for language extension lookups
48adc29721 replace "std::string::find(x) == 0" with cmHasPrefix()
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4501
2020-03-26 09:15:41 -04:00
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
f034b0f663 CMake compilation: do not use compiler extensions
For now, compiler extensions are no longer activated on CMake sources.
However these extensions are still used for various third parties.

This MR is a partial answer to the issue #20454.
2020-03-23 10:29:58 +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