Commit Graph

33250 Commits

Author SHA1 Message Date
Alex Turbov 439d2cf9cb cmake.cxx: Optimize calls to std::osteam::operator<< 2022-11-17 16:37:12 +04:00
Alex Turbov e06bd68b36 cmDocumentationFormatter: Hide internal methods into private section 2022-11-17 16:37:12 +04:00
Alex Turbov 5ef97a0182 cmDocumentation: Drop unused SetSections method 2022-11-17 16:37:11 +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
Alex Turbov 807aa8e353 CMakeSetup.cxx: Use anonymous namespace instead of static 2022-11-17 16:37:11 +04:00
Alex Turbov 96dcfa6b44 ccmake.cxx: Use anonymous namespace instead of static 2022-11-17 16:37:11 +04:00
Alex Turbov 8e2a03c078 ctest.cxx: Eliminate redundand trenary operator 2022-11-17 16:37:11 +04:00
Alex Turbov 9ae6569bfe ctest.cxx: Optimize std::ostream::operator<< calls 2022-11-17 16:37:10 +04:00
Alex Turbov fddc48dd26 ctest.cxx: Use anonymous namespace instead of static arrays 2022-11-17 16:37:10 +04:00
Alex Turbov 95a3d91e5c cmakemain.cxx: Remove always true preprocessor #if block 2022-11-17 16:37:10 +04:00
Alex Turbov ccff0b87a2 cmDocumentation: Accept Iterable instead of vector on add entries 2022-11-17 16:37:10 +04:00
Alex Turbov 067dcb9efd cmDocumentationSection: Accept Iterable instead of vector on add 2022-11-17 16:37:10 +04:00
Alex Turbov 09fdfe5afa cmDocumentationFormatter: Improve PrintFormatted
Instead of one char at time copy (append), use lines.
2022-11-17 16:37:10 +04:00
Alex Turbov 3feac60591 cmDocumentationFormatter: All printing methods accept strings 2022-11-17 16:37:09 +04:00
Alex Turbov 21c3e2107d cmDocumentationFormatter: Turn while () into for () loop 2022-11-17 16:37:09 +04:00
Alex Turbov c802bfc548 cmDocumentationFormatter: Eliminate one if in the PrintColumn loop 2022-11-17 16:37:09 +04:00
Alex Turbov f27537ec3d cmDocumentationFormatter: Turn TextWidth member into size_t
Cuz normally required text width can't be negative. It was `int`…
2022-11-17 16:37:09 +04:00
Alex Turbov 84241189f6 cmDocumentationFormatter: Prevent indentation reset side effect
Fix `cmDocumentationFormatter::PrintColumn()` method to eliminate
an indentation reset side effect.
2022-11-17 16:37:09 +04:00
Alex Turbov bbe854a45a cmDocumentation: Drop useless call to formatter's SetIndent()
The `cmDocumentationFormatter::PrintSection()` method ignores
the currently set indentation level and use it's own.
2022-11-17 16:37:09 +04:00
Alex Turbov cf39773df9 cmDocumentationFormatter: Turn TextIndent member into size_t
… instead of `std::string`.
2022-11-17 16:37:07 +04:00
Alex Turbov 1d6c8797fc cmDocumentationFormatter: Use std::ostream padding capabitily
… instead of manually print spaces to align fields.
2022-11-17 16:35:01 +04:00
Alex Turbov 5f3f811836 cmDocumentationFormatter: TextIndent member is std::string now
Was `const char*`.
2022-11-17 16:23:36 +04:00
Alex Turbov b0fe4036b7 cmDocumentationFormatter: PrintPreformatted accept string
Also, make it `const` method cuz it's not modify the state.
2022-11-17 16:23:35 +04:00
Alex Turbov 3be0d77cc4 cmDocumentationFormatter.h: No need virtual methods
Can be added later it really need.
Also, drop ctor/dtor to make the class trivially destructable.
2022-11-17 16:23:35 +04:00
Alex Turbov 3bff44ffd3 cmDocumentationEntry.h: Drop unused constructor 2022-11-17 16:23:35 +04:00
Alex Turbov f074e2bd49 cmDocumentation: Optimize std::ostream::operator<<() calls 2022-11-17 16:23:35 +04:00
Alex Turbov 8ab0168cbc cmDocumentation.cxx: Use lambda function instead of macro 2022-11-17 16:23:35 +04:00
Alex Turbov 049b017c5d cmDocumentation.cxx: Use anonymous namespace instead of static 2022-11-16 18:37:05 +04:00
Alex Turbov 30bcdafaef cmDocumentation: Remove MSVC 6 workaround 2022-11-16 18:37:05 +04:00
Brad King b686b58208 Merge topic 'cmp0141-pch-reuse'
94164ea55e CMP0141: Fix PCH REUSE_FROM when MSVC_DEBUG_INFORMATION_FORMAT is empty

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7914
2022-11-16 08:57:04 -05:00
Kitware Robot b7ab39bf59 CMake Nightly Date Stamp 2022-11-16 00:01:11 -05:00
Brad King eda68d229d Merge topic 'cmake-E-copy-t-mode'
8d9069e5b6 cmake -E copy: Add support for -t argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7913
2022-11-15 09:14:07 -05:00
Brad King 6f9544736a Merge topic 'better_handling_of_build_args'
01611f8258 cmake: --build improve detection of no build dir

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7908
2022-11-15 08:55:19 -05:00
Brad King 82e49021fe Merge topic 'top-level-command-order'
59573bf5b9 project: Warn at top-level if `cmake_minimum_required` wasn't called
23f3dd9f7c RunCMake/project: Ignore exact line number in stderr checks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7902
2022-11-15 08:51:20 -05:00
Kyle Edwards 8d9069e5b6 cmake -E copy: Add support for -t argument
Fixes: #23543
2022-11-15 07:47:07 -05:00
Brad King 94164ea55e CMP0141: Fix PCH REUSE_FROM when MSVC_DEBUG_INFORMATION_FORMAT is empty
Under the policy's NEW behavior, `[CMAKE_]MSVC_DEBUG_INFORMATION_FORMAT`
may be explicitly set to an empty string to tell CMake not to add any
flags for this abstraction.  In this case, fall back to checking the
language-wide flags as we do in the OLD behavior.

This revises commit 183b9a9eca (CMP0141: Fix PCH REUSE_FROM under policy
NEW behavior, 2022-10-31, v3.25.0-rc3~4^2).

Issue: #24106
2022-11-15 06:57:02 -05:00
Kitware Robot 0cb0be5920 CMake Nightly Date Stamp 2022-11-15 00:01:09 -05:00
Robert Maynard 01611f8258 cmake: --build improve detection of no build dir
Fixes #24157
2022-11-14 10:46:17 -05:00
Brad King 0e2a73fefd Merge topic 'profile-genex'
4d70a94545 Profiling: Profile genex evaluation
09d7f947d6 cmGeneratorExpression: Require cmake instance
553794e987 cmake::CreateProfilingEntry: Refactor to take lambda for args

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: alcroito <alexandru.croitor@qt.io>
Merge-request: !7898
2022-11-14 10:25:01 -05:00
Brad King 38c8866dd1 Merge topic 'msvc-19.34-cpp-modules'
0e9782b336 msvc: bless MSVC 19.34 support for C++ modules as experimental

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7745
2022-11-14 10:18:21 -05:00
Kitware Robot f3d2e3f95d CMake Nightly Date Stamp 2022-11-14 00:01:22 -05:00
Kitware Robot 168b82e68b CMake Nightly Date Stamp 2022-11-13 00:01:08 -05:00
Kitware Robot 2b99ae0324 CMake Nightly Date Stamp 2022-11-12 00:01:11 -05:00
Ben Boeckel 0e9782b336 msvc: bless MSVC 19.34 support for C++ modules as experimental
Visual Studio 17.4 now contains official support for what CMake needs.
2022-11-11 16:54:05 -05:00
friendlyanon 59573bf5b9 project: Warn at top-level if cmake_minimum_required wasn't called
The top-level project() call will now issue an AUTHOR_WARNING if it
wasn't called after cmake_minimum_required().

Fixes: #24071
2022-11-11 22:49:36 +01:00
Kyle Edwards 4d70a94545 Profiling: Profile genex evaluation 2022-11-11 12:29:41 -05:00
Kyle Edwards 09d7f947d6 cmGeneratorExpression: Require cmake instance 2022-11-11 12:29:41 -05:00
Kyle Edwards 553794e987 cmake::CreateProfilingEntry: Refactor to take lambda for args 2022-11-11 11:45:00 -05:00
Brad King 7338a69881 Merge topic 'fix-cxx20-detection'
5e7c8f44ac Ninja: Restore support for compilers not defining a C++ standard level

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Jaeden Amero <kitware@patater.com>
Acked-by: Martin Kojtal <martin.kojtal@arm.com>
Merge-request: !7896
2022-11-11 08:19:51 -05:00
Kitware Robot e462807942 CMake Nightly Date Stamp 2022-11-11 00:01:06 -05:00