Commit Graph

1081 Commits

Author SHA1 Message Date
Jannik Alber
c80190c6ab InnoSetup: Always specify at least one component installation type
Inno Setup implicitly creates three installation types if none is
specified in the script. This causes some component features (e.g.
`REQUIRED`) to lose their functionality.  Teach the generator to always
specify a "custom" installation type when using components.

Fixes: #25083
2023-07-17 10:30:25 -04:00
Brad King
93ee2b369c Source: Fix -Wdangling-reference warnings exposed by gcc 13 2023-05-22 17:14:54 -04:00
Brad King
4dc47f82c2 Merge topic 'CMake-uses-cmList-class'
241304190f CMake code rely on cmList class for CMake lists management (part. 2)
87fe031a07 cmList class: various enhancements

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8441
2023-05-01 11:38:32 -04:00
Marc Chevrier
241304190f CMake code rely on cmList class for CMake lists management (part. 2) 2023-04-29 09:54:31 +02:00
Marc Chevrier
87fe031a07 cmList class: various enhancements 2023-04-29 09:54:22 +02:00
Jannik Alber
1d6db66179 CPack: Add Inno Setup generator 2023-04-28 09:33:28 -04:00
Marc Chevrier
e08ba229ee CMake code rely on cmList class for CMake lists management (part. 1) 2023-04-24 10:41:10 +02:00
Martin Duffy
19305afd8a presets: Improve JSON parser and error messages 2023-03-29 10:41:19 -04:00
scivision
7b0a629693 Source: use C++11 nullptr 2023-02-14 14:34:03 -05:00
Brad King
a429e4b9b1 CYGWIN: Drop pre-2.8.4 compatibility mode CMAKE_LEGACY_CYGWIN_WIN32
Prior to CMake 2.8.4 (released in 2011), we defined `WIN32` on CYGWIN.
That was removed, but an undocumented `CMAKE_LEGACY_CYGWIN_WIN32`
compatibility mode was left to help projects transition.  Only projects
that do not require at least 2.8.4 as their minimum CMake version need
the compatibility mode.  We've also long warned about projects that do
not require at least 2.8.12, so it is now reasonable to remove the
legacy compatibility mode.
2023-01-19 14:29:35 -05:00
Kitware Robot
33abef7416 Revise C++ coding style using clang-format-15
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`.  Use `clang-format` version 15.

* 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.

Fixes: #24315
2023-01-18 16:20:47 -05:00
Vitaly Stakhovsky
b3edfcf46e cmValue: Use operator* explicitly to convert to std::string; avoid extra call 2023-01-15 23:39:02 -05:00
Kyle Edwards
830eed374d CMake: fix sizeof string literal violations 2022-11-18 09:37:58 -05:00
Alex Turbov
df2047c2ac cpack.cxx: Optimize calls to std::osteam::operator<< 2022-11-17 16:37:13 +04:00
Alex Turbov
f6180485bb cpack.cxx: Eliminate redundant if 2022-11-17 16:37:12 +04:00
Alex Turbov
d7c183f35c cpack.cxx: Deduplicate "Generators" section creation code 2022-11-17 16:37:12 +04:00
Alex Turbov
69918b07e1 cmDocumentationEntry: Drop all user provided ctors for C++ >= 14
There is no need for them cuz:

- the last field has a default value
- all static instances use 2 arguments convertible to `std::string`
- "dynamic" instances used for _Generator_ doc entries access
  fields diectly using default constructed instance

Moreover, compiler may generate move ctor/assign when needed.
2022-11-17 16:37:12 +04:00
Alex Turbov
74b735dea8 cmDocumentation: char*[][2]cmDocumentationEntry[N]
Use fixed size arrays of `cmDocumentationEntry` items instead of
open arrays of two `char` pointers when describe program options
help screens.

Also, drop `const char*[][2]` overloads of methods of
`cmDocumentation` and `cmDocumentationSection` classes in the sake
of generic (template) appenders introduced earlier.
2022-11-17 16:37:11 +04:00
Brad King
12ca3c14a5 Merge topic 'cpack-trace-argument'
b5ebaa0d9c CPack: Require no argument for --trace and --trace-expand

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7824
2022-10-27 09:29:13 -04:00
Kyle Edwards
b5ebaa0d9c CPack: Require no argument for --trace and --trace-expand
This was accidentally broken by commit 87c762d435 (CPack: Use
cmCommandLineArgument instead of cmsys::CommandLineArguments,
2022-04-18, v3.24.0-rc1~258^2).

Fixes: #24085
2022-10-25 10:11:20 -04:00
Johnny Jazeix
d1613ac880 CPack/NSIS: Add options to set makensis arguments
Fixes: #23446
2022-09-26 17:58:12 +02:00
Alex Turbov
98e8b1755b Build: Move HAVE_CoreServices to cmCPackConfigure.h 2022-09-22 09:24:49 -04:00
Alex Turbov
7df955315b Build: Add ENABLE_BUILD_FREEBSD_PKG to cmCPackConfigure.h 2022-09-22 09:24:49 -04:00
Alex Turbov
626136ad4d Build: Use imported LibUUID::LibUUID target instead of variables
Also, simplify preprocessor condition to enable WIX CPack generator.
2022-09-22 09:24:48 -04:00
Brad King
69947f4984 Merge topic 'cpack-archive-custom-extension'
cc3cd8bc2a CPack: allow custom file extension in archive generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7563
2022-09-07 09:44:16 -04:00
Andrey Filipenkov
cc3cd8bc2a CPack: allow custom file extension in archive generator 2022-09-01 11:35:58 -04:00
Kyle Edwards
a8d73085f4 CPack: Add support for presets
Fixes: #23117
2022-08-31 11:56:21 -04:00
Alex Turbov
28ecfd1690 Help: Short options first, then long, then Windows style 2022-08-14 09:58:41 +04:00
Adriaan de Groot
2655605261 FreeBSD: follow CPACK_PACKAGE_FILE_NAME, if set
The underlying pkg library always produces a <name>-<version>.pkg
file, so to follow CPACK_PACKAGE_FILE_NAME we need to detect
that and rename appropriately.

FIXES #23034
2022-07-05 16:00:43 +02:00
Adriaan de Groot
1b61cd1597 FreeBSD: explain the pkg_create() call
- the upstream API is undocumented, so dig in the C sources
  to get parameter names.
2022-07-05 14:24:45 +02:00
Adriaan de Groot
57e8cd1a81 FreeBSD: drop support for libpkg before 1.17
All supported FreeBSD versions are now using 1.17 or later
2022-07-05 11:42:00 +02:00
FeRD (Frank Dana)
98a10290a8 cmSystemTools: Fix 'ErrorOccurred' spelling
Rename the booleans 's_ErrorOccured' and 's_FatalErrorOccured' to
's_ErrorOccurred' and 's_FatalErrorOccurred', respectively.

Rename the getters and setters to 'Get[Fatal]ErrorOccurred' and
'Set[Fatal]ErrorOccurred', and fix all uses across the codebase.
2022-06-13 09:05:24 -04:00
Ben Boeckel
6ff03d463f clang-tidy: address google-readability-casting lints
At least those involving `static_cast`.
2022-05-24 09:09:43 -04:00
Ben Boeckel
a5f8cbe8b1 clang-tidy: address modernize-use-default-member-init lints 2022-05-24 09:09:43 -04:00
Ben Boeckel
f1d55ff7e9 style: use cmStrCat in some more locations 2022-05-19 15:54:28 -04:00
Brad King
7d78dcbebb Merge topic 'cpack-wix-arch'
cae7e5e38d CPack/WIX: Add CPACK_WIX_ARCHITECTURE to support Windows for ARM installers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7236
2022-05-05 09:31:46 -04:00
jakoblover
cae7e5e38d CPack/WIX: Add CPACK_WIX_ARCHITECTURE to support Windows for ARM installers 2022-05-05 09:11:57 -04:00
Craig Scott
c150f89f4d CPack: Remove the deprecated PackageMaker generator
This CPack generator has been deprecated since commit 7bf187499f
(CPack: Deprecate PackageMaker generator, 2020-01-31).

Fixes: #23344
2022-05-05 08:36:44 +10:00
Brad King
e253e57fe3 Merge topic 'restore-CPACK_PACKAGEMAKER_CHOICES'
d099136add productbuild: Restore CPACK_PACKAGEMAKER_CHOICES variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7220
2022-05-03 11:24:11 -04:00
Craig Scott
d099136add productbuild: Restore CPACK_PACKAGEMAKER_CHOICES variable
In 2a8df7e7db (productbuild: Don't write rootVolumeOnly attribute if
writing domains, 2022-03-21), the variable holding the main contents
of the distribution.dist XML file was renamed from
CPACK_PACKAGEMAKER_CHOICES to CPACK_APPLE_PKG_INSTALLER_CONTENT.
This reflected the fact that the PackageMaker generator is deprecated.
The new variable also includes more details than the old one held.
Some projects were relying on the old variable name, so we need to still
set that to the same contents as it would have previously provided.

Neither of these variables were previously documented, but the older
variable was mentioned in enough semi-official places that it essentially
became semi-supported. Document both variables and highlight that the
older one is deprecated.

Fixes: #23467
2022-04-30 00:28:05 +10:00
Kyle Edwards
87c762d435 CPack: Use cmCommandLineArgument instead of cmsys::CommandLineArguments 2022-04-20 11:45:28 -04:00
Jean-Philippe Lebel
331c5d458e CPackIFW: Fix regression in icon file names
Changes in commit 761b6e2466 (CPackIFW: Avoid colliding names for icons
/ logos, 2021-10-08, v3.23.0-rc1~546^2) accidentally left an extra `.`
in computed file names.  Remove it.

Fixes: #23423
2022-04-14 09:45:35 -04:00
Craig Scott
e41f1ef6ff CPack/IFW: Add missing referenced source file validation 2022-03-25 22:53:19 +11:00
Craig Scott
2a8df7e7db productbuild: Don't write rootVolumeOnly attribute if writing domains
The rootVolumeOnly attribute is deprecated. Apple docs say to use
domains instead.

Fixes: #23343
2022-03-21 15:43:46 +11:00
Craig Scott
28fdc3a536 productbuild: Simplify internal CPACK_PRODUCTBUILD_DOMAINS usage
There's no benefit to storing the CPACK_PRODUCTBUILD_DOMAINS
prefix in a variable and appending to it in the C++ code. It has the
disadvantage of making it harder to find usages of the variables with
a suffix appended to that string. Expand out the strings at the places
they are used so that they are easier to spot.
2022-03-21 13:36:48 +11:00
Brad King
9e38bfa915 CPack/DMG: Add explicit option to use CPACK_RESOURCE_FILE_LICENSE for SLA
Since macOS 12.0, the ``hdiutil udifrez`` and ``hdiutil udifderez``
commands to embed and extract resources in a disk image are deprecated.
The CPack DragNDrop Generator uses these to attach the SLA specified by
the `CPACK_RESOURCE_FILE_LICENSE` option.  Since that option is shared
by multiple CPack generators, we cannot deprecate it.  Instead, add an
explicit option to control the behavior.  This will give projects a way
to package on future macOS versions that remove the commands.

In order to provide a long-term transition away from attaching SLAs to
disk images, update `cpack` to default this behavior to OFF.  To retain
compatibility for CMake projects, teach the CPack module to default the
option to ON.  Later a policy can be added to change the default.

Issue: #22978
2022-01-18 15:39:51 -05:00
David Wosk
da737d34e0 CPack/productbuild: add options to control domains element
The domains element determines the required authorization level needed
for the install. The auth attribute of the pkg-ref element has been
deprecated in favor of domains, so if the domains options are
specified, the auth attribute is omitted.

Fixes: #23030
2022-01-06 11:33:25 -05:00
Adriaan de Groot
c3715e08e4 FreeBSD: tidy up
- mismatched comments and code,
- remove superfluous log of the "Real package" (which can
  still change! log the changed filename if it does),
- the "fix up the package name" code was replacing the
  pkg 1.17 suffix by the pkg 1.17 suffix, so it wasn't
  really being useful. Whether **any** of the backwards-
  compatibility packaging code is useful is another thing.
2021-12-21 14:29:59 +01:00
Adriaan de Groot
a76f19d5e8 FreeBSD: handle new package-file-suffix 2021-12-21 13:59:27 +01:00
Adriaan de Groot
d5ae2f9754 FreeBSD: fix up the package name
When using libpkg, the output filename is determined by libpkg
itself, based on information in the manifest: package name and
version, basically. This doesn't necessarily match the name that
CMake has determined via CPACK_TEMPORARY_PACKAGE_FILE_NAME or
CPACK_PACKAGE_FILE_NAME. So reset the CMake-determined list
to match what libpkg will do.
2021-12-21 13:59:27 +01:00