Commit Graph

31 Commits

Author SHA1 Message Date
Kitware Robot
1772622772 LICENSE: Replace references to Copyright.txt with LICENSE.rst
```
git grep -lz 'Copyright.txt or https://cmake.org/licensing ' |
  while IFS= read -r -d $'\0' f ; do
    sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / {
              s/Copyright.txt/LICENSE.rst/
            }' "$f" ; done
```
2025-03-03 10:43:35 -05:00
Kitware Robot
0b96ae1f6a Revise C++ coding style using clang-format with "east const"
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`, now with "east const" enforcement.
Use `clang-format` version 18.

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

Issue: #26123
2025-01-23 13:09:50 -05:00
Vitaly Stakhovsky
17ee28728b cmCPackGenerator: Add GetOptionIfSet() to avoid duplicate calls 2024-11-04 12:59:15 -05:00
Ben Boeckel
09b7ac7f67 strings: use single characters where possible 2023-07-30 18:33:07 -04:00
Ben Boeckel
1b60137b98 strings: combine string literals 2023-07-30 18:33:07 -04:00
Ben Boeckel
f5d04b5bf0 cmStrCat: use where possible in Apple-specific sources 2023-07-30 18:33:07 -04:00
Greg Fiumara
7213ceb869
CPack/productbuild: Add option to customize product identifier
This adds a new option, CPACK_PRODUCTBUILD_IDENTIFIER, which allows
for customization of the productbuild product identifier within the
CPack productbuild generator.

Fixes: #20830
2021-11-18 13:01:35 -05:00
Marc Chevrier
cc56dc7468 Rename cmProp in cmValue 2021-09-21 17:14:04 +02:00
Marc Chevrier
7fce78982b Use new SetOption signatures 2021-09-15 18:30:49 +02:00
Marc Chevrier
202a65759b cmCPackGenerator::GetOption returns cmProp 2021-09-13 09:54:27 -04: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
Regina Pfeifer
f30523d090 clang-tidy: modernize-deprecated-headers 2019-09-16 10:11:13 -04:00
Sebastian Holtermann
9b334397f5 Source sweep: Use cmStrCat for string concatenation
This patch is generated by a python script that uses regular expressions to
search for string concatenation patterns of the kind

```
std::string str = <ARG0>;
str += <ARG1>;
str += <ARG2>;
...
```

and replaces them with a single `cmStrCat` call

```
std::string str = cmStrCat(<ARG0>, <ARG1>, <ARG2>, ...);
```

If any `<ARGX>` is itself a concatenated string of the kind

```
a + b + c + ...;
```

then `<ARGX>` is split into multiple arguments for the `cmStrCat` call.

If there's a sequence of literals in the `<ARGX>`, then all literals in the
sequence are concatenated and merged into a single literal argument for
the `cmStrCat` call.

Single character strings are converted to single char arguments for
the `cmStrCat` call.

`std::to_string(...)` wrappings are removed from `cmStrCat` arguments,
because it supports numeric types as well as string types.

`arg.substr(x)` arguments to `cmStrCat` are replaced with
`cm::string_view(arg).substr(x)`
2019-08-22 16:38:10 +02:00
Vitaly Stakhovsky
65baaa0e37 cmSystemTools::RunSingleCommand: Accept std::string argument 2019-02-06 11:02:10 -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
Brad King
cb6229b8b8 clang-tidy: fix warnings in macOS-only code 2018-11-27 13:20:34 -05: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
Kitware Robot
d7204e649e Revise C++ coding style using clang-format-6.0
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 6.0.

* 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.
2018-06-01 09:53:42 -04:00
Wouter Klouwen
e6a80ccfc4 Make use of std::chrono throughout every component
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.
2018-01-23 18:56:42 +00:00
Matthias Maennich
2033abff0d Fix minor clang-tidy findings
Fix issues diagnosed by clang-tidy
 - modernize-use-bool-literals
 - misc-string-integer-assignment
 - performance-faster-string-find
 - readability-redundant-string-cstr
 - readability-delete-null-pointer

Signed-off-by: Matthias Maennich <matthias@maennich.net>
2017-09-28 07:23:42 -04:00
Matthias Maennich
a5279ae553 Use C++11 nullptr (cont.)
Fix remaining occurrences of the issue addressed in commit 5962db4389
(Use C++11 nullptr, 2017-08-22) that are only showing up on macOS.

Signed-off-by: Matthias Maennich <matthias@maennich.net>
2017-09-19 11:44:21 -04:00
Brad King
66094d1224 Merge topic 'productbuild_component_plist'
d32f9deb CPack: Add option to specify --component-plist for productbuild
2017-02-20 10:43:05 -05:00
Tim Hutt
734581f49f CPack: Add support for CPACK_PRODUCTBULID_RESOURCES_DIR
This allows you to copy custom files (e.g. a background image) into the
macOS installer.

Fixes: #16604
2017-02-17 11:47:00 -05:00
Tim Hutt
d32f9debc8 CPack: Add option to specify --component-plist for productbuild
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
2017-02-17 11:40:45 -05:00
Roman Wüger
48aad9cda0 CPackProductBuild: Add options to sign packages 2017-02-04 08:07:48 -05:00
Daniel Pfeifer
aeff60e44c iwyu: Fix OSX specific issues 2016-11-23 00:41:44 +01:00
Brad King
86578eccf2 Simplify CMake per-source license notices
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.
2016-09-27 15:14:44 -04:00
Gregor Jasny
60dcaaea13 tidy: Fix readability-redundant-string-cstr issues 2016-09-04 16:55:05 +02:00
Brad King
ff08a80af1 Source/CPack: Run clang-format to fix style 2016-06-07 08:41:16 -04:00
Daniel Pfeifer
fa277b29e4 Remove c_str() calls from stream arguments.
Mostly automated:

git grep -l '.c_str() <<' | xargs sed -i 's|\.c_str() <<| <<|g'
2016-06-06 23:53:32 +02:00
Clinton Stimpson
2e3c67d1b6 productbuild: Add new productbuild cpack generator.
This cpack generator basically replaces the obsolete PackageMaker generator.
2016-06-03 14:41:57 -06:00