Ben Boeckel
6ff03d463f
clang-tidy: address google-readability-casting lints
...
At least those involving `static_cast`.
2022-05-24 09:09:43 -04:00
Martin Duffy
30336dab66
cmJSONHelpers: Restructure cmJSONHelpers
...
Restructure cmJSONHelpers to prevent SunPro errors when passing context.
2022-05-05 12:12:12 -04:00
Marc Chevrier
b13eef5a90
cm::enum_set: container that contains a set of unique enum values.
...
The enum must be an `enum class` with an unsigned integer as base type.
2022-04-27 19:40:40 +02:00
Brad King
3055b202ec
Merge topic 'builtin-help-versionadded'
...
054754359a cmRST: support `versionadded` and `versionchanged` directives
Acked-by: Kitware Robot <kwrobot@kitware.com >
Acked-by: buildbot <buildbot@kitware.com >
Merge-request: !6667
2021-10-28 09:09:24 -04:00
Ben Boeckel
054754359a
cmRST: support versionadded and versionchanged directives
...
This makes `versionadded` and `versionchanged` directives show up in
`cmake --help-*` output instead of disappearing (and potentially making
empty sections).
Fixes : #22808
2021-10-27 09:15:00 -04:00
Sean McBride
1cf14f8c03
Source: fix many -Wmissing-prototypes warnings by marking functions static
2021-10-25 12:27:09 -04:00
Brad King
09f4edbcef
Fix Clang -Wbitwise-instead-of-logical warnings
2021-10-13 10:00:08 -04:00
Sean McBride
907d098838
Source: Fix clang -Wextra-semi warnings
2021-09-28 09:59:24 -04:00
Brad King
b6c4d93dcd
clang-analyzer: Suppress warnings in intentional use-after-move cases
2021-06-03 14:59:55 -04:00
Josef Angstenberger
e4a856f8b9
Tests: Fix typos and spelling in test error message
2021-05-07 17:00:14 +02:00
Ben Boeckel
808b17b120
clang-tidy: fix readability-make-member-function-const warnings
2021-01-27 08:45:45 -05:00
Brad King
7d498d6b43
Utilities/Sphinx: Add role and directive for 'genex' in CMake domain
...
This enables cross-reference syntax for CMake generator expressions:
:genex:`SOME_GENEX`
:genex:`$<SOME_GENEX>`
:genex:`$<SOME_GENEX:...>`
and definition of CMake generator expressions via a directive:
.. genex:: SOME_GENEX
.. genex:: $<SOME_GENEX>
.. genex:: $<SOME_GENEX:...>
It also adds generator expressions defined by the directive and by
`Help/genex/SOME_GENEX.rst` documents to the index.
2021-01-18 12:35:41 -05:00
Brad King
621ba5e1f2
cmRST: Add support for 'envvar' directive
...
This was accidentally left out of commit 8acf46caf1 (Utilities/Sphinx:
Add role and directive for 'envvar' in CMake domain, 2018-04-19,
v3.12.0-rc1~200^2~1).
2021-01-18 12:35:40 -05:00
Oleksandr Koval
209daa20b2
Code style: add missed explicit 'this->'
...
CMake uses explicit 'this->' style. Using custom clang-tidy check we can
detect and fix places where 'this->' was missed.
2021-01-05 14:32:36 +02:00
Eicke Herbertz
8c42cfb2e8
test/CMakeLib: make testUVProcessChain work with qemu
...
When building and testing CMake in a container with qemu
user mode emulation, the expected termination with std::abort()
in testUVProcessChainHelper leads qemu to emit an additional
message about an uncaught signal. There appears to be no way
to make qemu shut up, so any qemu message will be removed
from the output during validation.
2020-10-29 19:52:54 +01:00
Kyle Edwards
0668120398
cm::optional: Fix move assignment
2020-10-21 14:23:43 -04:00
Kyle Edwards
946adadd40
cmGccDepfileReader: Rework helper code
...
Fix some of the semantics of the depfile, add error handling, and
refactor cmGccDepfileLexerHelper.
2020-10-13 10:18:02 -04:00
Kyle Edwards
06c0d59c17
IWYU: Map <*> headers to <cm/*> headers
...
For headers which exclusively contain things that were not present
in C++11.
2020-10-08 13:40:21 -04:00
Kyle Edwards
3059e6aed7
cmJSONHelpers: Add new Bind() function
2020-10-05 09:49:59 -04:00
Marc Chevrier
82c9508313
cmake_path: enhancements
...
* Fix error on parsing "c:a" (root-name without root-directory)
* Enrich documentation
2020-09-20 15:17:34 +02:00
Kyle Edwards
3f3a30e1e0
JSON: Add helpers
2020-09-09 08:29:02 -04:00
Kyle Edwards
e366977e62
Merge topic 'cmstrlen'
...
0c9cdf30ed cmStringAlgorithms: Add cmStrLen()
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !5201
2020-09-09 08:21:26 -04:00
Kyle Edwards
0c9cdf30ed
cmStringAlgorithms: Add cmStrLen()
2020-09-08 10:15:54 -04:00
Kyle Edwards
7e1304c6e6
cm::optional: Add comparison operators
2020-09-07 08:50:09 -04:00
Kyle Edwards
c854e9eba5
Refactor: Add ASSERT_TRUE() macro to testOptional.cxx
2020-09-06 17:39:27 -04:00
Brad King
9fc8e827c8
Tests: Fix -Wsuggest-destructor-override warning in testCMExtMemory
2020-07-28 10:06:31 -04:00
Jean-Christophe Fillion-Robin
207373802e
Fix typos identified using codespell
...
See https://github.com/codespell-project/codespell#readme
The following command was used:
```
codespell -q6 --skip="\
.git,\
*.json,\
./Copyright.txt,\
./Help/command/foreach.rst,\
./Help/prop_test/REQUIRED_FILES.rst,\
./Help/variable/CTEST_COVERAGE_COMMAND.rst,\
./Modules/CMakeCheckCompilerFlagCommonPatterns.cmake,\
./Modules/CMakeRCInformation.cmake,\
./Modules/Internal/CPack/NSIS.template.in,\
./Modules/FindMatlab.cmake,\
./Modules/MatlabTestsRedirect.cmake,\
./Modules/Platform/Windows-Clang.cmake,\
./Modules/Platform/Windows-Intel-Fortran.cmake,\
./Modules/Platform/Windows-MSVC.cmake,\
./Source/CMakeVersion.cmake,\
./Source/cmConvertMSBuildXMLToJSON.py,\
./Source/cmCreateTestSourceList.cxx,\
./Source/cmGlobalVisualStudio10Generator.cxx,\
./Source/cmExportBuildFileGenerator.cxx,\
./Source/cmExportInstallAndroidMKGenerator.cxx,\
./Source/cmExportInstallFileGenerator.cxx,\
./Source/cmExportSet.cxx,\
./Source/cmExportTryCompileFileGenerator.cxx,\
./Source/cmFindPackageCommand.cxx,\
./Source/cmInstallCommand.cxx,\
./Source/cmGeneratorExpressionLexer.cxx,\
./Source/cmLocalVisualStudio7Generator.cxx,\
./Source/cmOrderDirectories.cxx,\
./Source/cmTarget.cxx,\
./Source/kwsys/*,\
./Source/QtDialog/CMakeSetupDialog.ui,\
./Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx,\
./Source/CTest/cmParseCoberturaCoverage.h,\
./Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in,\
./Tests/RunCMake/CPack/tests/DMG_SLA/English.license.rtf,\
./Tests/RunCMake/CPack/tests/DMG_SLA/German.license.txt,\
./Tests/RunCMake/CPack/tests/DMG_SLA/German.menu.txt,\
./Tests/RunCMake/GoogleTest/xml_output.cpp,\
./Tests/RunCMake/Make/TargetMessages*,\
./Utilities/*,\
" \
-L "\
dependees,\
endwhile,\
fo,\
filetest,\
helpfull,\
nd,\
objext,\
stoll,\
supercedes,\
superceded,\
vas,\
varn,\
"
```
2020-07-22 12:44:47 -04:00
Brad King
2282be37a5
Merge topic 'stl-support-filesystem-path'
...
d654bf3449 STL Support: Add cm::filesystem::path in <cm/filesystem>
e5798126fc STL Support: introduce dedicated configuration file
4408f34cfe STL Support: Add function cm::quoted in <cm/iomanip>
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !4968
2020-07-13 07:59:43 -04:00
Tobias Ribizel
f38e4a1871
Tests: Add cases for CTest cuda-memcheck parser
2020-07-09 19:08:34 +02:00
Marc Chevrier
d654bf3449
STL Support: Add cm::filesystem::path in <cm/filesystem>
2020-07-09 17:02:42 +02:00
Marc Chevrier
2faa3f6c55
Refactoring: Third-parties public headers are under cm3p prefix
...
Fixes : #20666
2020-05-07 12:06:08 +02:00
Brad King
68a59ab288
Merge topic 'stl-support'
...
8d4a9ee398 Refactoring: rename "cm_static_string_view.hxx" as <cmext/string_view>
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !4689
2020-05-01 08:27:37 -04:00
Marc Chevrier
8d4a9ee398
Refactoring: rename "cm_static_string_view.hxx" as <cmext/string_view>
2020-04-30 09:53:27 +02:00
Ben Boeckel
99663a5157
IWYU: mark <cstddef> as needed
...
Newer IWYU is not seeing this as necessary for `_GLIBCXX_USE_CXX11_ABI`.
2020-04-29 11:16:44 -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
89a3d33d11
Merge topic 'automoc-using-depfiles'
...
aebfbcaa46 AutoGen: Use depfiles for the XXX_autogen ninja targets
f765fdea03 AutoGen: Use moc's feature to output dependencies
f8c505d4b3 Add a parser for GCC-style depfiles
Acked-by: Kitware Robot <kwrobot@kitware.com >
Acked-by: Jan Niklas Hasse <jhasse@bixense.com >
Merge-request: !4221
2020-01-30 09:52:33 -05:00
Joerg Bornemann
f8c505d4b3
Add a parser for GCC-style depfiles
...
Introduce the function cmReadGccDepfile that parses a GCC-style depfile
and returns its content. The implementation uses a lexer that is
modeled after the re2c implementation in Ninja.
The sample files of the autotest have been created with gcc 8.3.0.
This depfile reader is to be used by the Autogen facility to make use
of the depfiles that are generated by Qt's meta object compiler.
2020-01-28 11:16:11 -05:00
Brad King
e4e41d33d6
Merge topic 'cmsting-stl-compatibility'
...
8f839d02e3 cm::String: enhance compatibility with STL
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !4281
2020-01-28 10:58:11 -05:00
Marc Chevrier
8f839d02e3
cm::String: enhance compatibility with STL
2020-01-25 18:16:16 +01:00
Marc Chevrier
73d1da4f86
Stl support: cm::append now supports any sequential container
2020-01-24 15:55:32 +01:00
Craig Scott
da9cbeb3e9
Merge topic 'ctest-resource-allocation-spec-message'
...
b393b32b4b CTest: Improve error handling when reading resource spec file
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !4162
2019-12-28 19:03:00 -05:00
Kyle Edwards
b393b32b4b
CTest: Improve error handling when reading resource spec file
...
Fixes : #20079
2019-12-27 10:53:52 -05:00
Brad King
1546ee39bd
Merge topic 'test-resource-spec-init-lists'
...
e8dbe4bba1 Tests: Fix testCTestResourceSpec struct initialization for some compilers
Acked-by: Kitware Robot <kwrobot@kitware.com >
Acked-by: Michael Dickens <michael.dickens@ettus.com >
Merge-request: !4141
2019-12-19 09:51:53 -05:00
Michael Dickens
e8dbe4bba1
Tests: Fix testCTestResourceSpec struct initialization for some compilers
...
Some compilers do not like the nested `{{{}}}` member initialization
syntax, so use just `{}`. GCC 4.8 warns about the latter, so add a
suppression.
Fixes : #20097
2019-12-18 05:45:08 -05:00
Marc Chevrier
a38d04c076
Refactoring: introduce header cmext/algorithm with append functions
2019-12-17 10:43:58 +01:00
Brad King
e9e0e401c6
Merge topic 'cmext-memory'
...
fc3b4caa2e Memory management: cast functions for managed pointers
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !4064
2019-12-04 14:22:01 -05:00
Kyle Edwards
398dfc1338
Merge topic 'ctest-spec-file-version-test'
...
59df85194e CTest Resource Allocation: Add test for spec file with no version
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !4092
2019-11-27 22:48:20 -05:00
Marc Chevrier
fc3b4caa2e
Memory management: cast functions for managed pointers
2019-11-27 16:03:04 +01:00
Kyle Edwards
59df85194e
CTest Resource Allocation: Add test for spec file with no version
2019-11-26 11:41:56 -05:00
Brad King
3d5227e6b6
Merge topic 'ctest-resource-fixes'
...
a033bafbe0 Help: Clarify how tests are run if no resource spec file is specified
a64ba0235f CTest: Clarify that resource requirements can be split
f9f294f5fa CTest: Add version field to resource spec file
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !4080
2019-11-26 09:12:34 -05:00