Commit Graph

1112 Commits

Author SHA1 Message Date
Kyle Edwards
a5f98df778 Source: Fix mysterious new IWYU warnings 2023-08-29 10:51:30 -04:00
Ben Boeckel
0abde043d2 cmCryptoHash: prefer to cmSystemTools::ComputeFileHash 2023-08-08 13:23:55 -04:00
Ben Boeckel
ec5f1c489a cmCryptoHash: prefer to cmSystemTools::ComputeStringMD5
The latter call is no longer post-bootstrap only since 596439b1bb
(cmCustomCommandGenerator: Add option to transform depfile, 2020-10-05)
via !5325. Convert callers to just use `cmCryptoHash` directly and
remove the bootstrap guard.
2023-08-08 13:22:13 -04:00
Brad King
d8b6a750a0 Merge topic 'windows-tidy-cmstrcat'
d58253d155 clang-tidy: fix `performance-faster-string-find` lints
a19ec77200 clang-tidy: fix `readability-static-accessed-through-instance` lints
3d03629f20 cmWIXRichTextFormatWriter: remove identity cast
1df29567ac clang-tidy: fix `modernize-use-equals-default` lints
32fe862b8c clang-tidy: fix `readability-container-size-empty` lints
7eaab9a957 clang-tidy: fix `modernize-raw-string-literal` lints
ffa49c23aa clang-tidy: fix `readability-else-after-return` lints
4489e9a85c clang-tidy: fix `modernize-use-auto` lints
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8668
2023-08-01 09:31:45 -04:00
Ben Boeckel
d58253d155 clang-tidy: fix performance-faster-string-find lints 2023-07-30 20:19:49 -04:00
Ben Boeckel
a19ec77200 clang-tidy: fix readability-static-accessed-through-instance lints 2023-07-30 20:19:48 -04:00
Ben Boeckel
3d03629f20 cmWIXRichTextFormatWriter: remove identity cast 2023-07-30 20:19:48 -04:00
Ben Boeckel
1df29567ac clang-tidy: fix modernize-use-equals-default lints 2023-07-30 20:19:48 -04:00
Ben Boeckel
32fe862b8c clang-tidy: fix readability-container-size-empty lints 2023-07-30 20:19:48 -04:00
Ben Boeckel
7eaab9a957 clang-tidy: fix modernize-raw-string-literal lints 2023-07-30 20:19:48 -04:00
Ben Boeckel
09b7ac7f67 strings: use single characters where possible 2023-07-30 18:33:07 -04:00
Ben Boeckel
6aa9023700 string_view: use string_view literals in comparisons 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
e1b70d7286 cmCPackDragNDropGenerator: use a string instead of a stream for commands 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
Ben Boeckel
ce549909fb cmCPackPKGGenerator: remove unnecessary .c_str() calls 2023-07-30 18:33:07 -04:00
Ben Boeckel
e48dbbf048 cmCPackDragNDropGenerator: remove unnecessary string construction 2023-07-30 18:33:07 -04:00
Ben Boeckel
084aa40ecb clang-tidy: fix modernize-loop-convert lints 2023-07-30 18:33:07 -04:00
Ben Boeckel
ffa49c23aa clang-tidy: fix readability-else-after-return lints 2023-07-27 20:15:51 -04:00
Ben Boeckel
4489e9a85c clang-tidy: fix modernize-use-auto lints 2023-07-27 20:15:51 -04:00
Ben Boeckel
93a366697f clang-tidy: fix modernize-use-nullptr lints 2023-07-27 20:15:51 -04:00
Ben Boeckel
e8983bd20d clang-tidy: fix readability-braces-around-statements lints 2023-07-27 20:15:51 -04:00
Ben Boeckel
48b38d2d86 cmLocalVisualStudio10Generator: remove unnecessary .c_str() 2023-07-27 20:15:51 -04:00
Ben Boeckel
d4144b9c0a strings: use emplace_back with cmStrCat arguments 2023-07-27 20:15:51 -04:00
Ben Boeckel
809248a0c9 strings: use character literals where possible 2023-07-27 20:00:59 -04:00
Ben Boeckel
7137b17835 cmStrCat: use in Windows-specific sources 2023-07-27 20:00:59 -04:00
Ben Boeckel
2409f62d18 strings: simplify streaming sequences 2023-07-27 19:10:39 -04:00
Ben Boeckel
a5ba00bdf8 strings: combine string literals where possible 2023-07-27 19:10:39 -04:00
Ben Boeckel
3f1378fbca strings: compare to static string_view instances in Windows-only code 2023-07-27 19:10:39 -04:00
Brad King
e9659abde1 Merge topic 'innosetup-component-install'
c80190c6ab InnoSetup: Always specify at least one component installation type

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8630
2023-07-18 10:29:57 -04:00
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
Marc Chevrier
45f17e5a85 cmList: Add container conversion to string 2023-06-22 15:44:17 +02: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