Commit Graph

33 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
Daniel Pfeifer
8768a0c6e1 cmCTest*Command: Port away from cmCommand
Copy the necessary parts, but remove cloning and make all commands
immutable.
2024-11-05 10:20:12 +01:00
Daniel Pfeifer
c98ed10d0f cmCTest*Command: Declare member functions const 2024-11-05 10:20:12 +01:00
Daniel Pfeifer
0e995d4897 cmCTest*Command: Direct use of cmExecutionStatus
Make sure that getting Makefile and setting Error is both done
through a `status` argument rather than through `cmCommand`.
2024-11-05 10:20:12 +01:00
Daniel Pfeifer
26a697f7c1 cmCTest*Command: Access Makefile through an alias
At the top of each function that requires access to Makefile,
declare an alias `mf = this->Makefile`.  Then replace all occurrences
of `this->Makefile->` with `mf.`.  The intention is to make following
changes easier to review.
2024-11-05 10:20:12 +01:00
Daniel Pfeifer
ff2ec0387a cmCTest*Command: Generalize argument parsing and checking
Move the instantiation of unparsed arguments as well as the `parser.Parse` call
behind an abstraction.  Merge checks on `captureCMakeError`.
2024-11-05 10:20:12 +01:00
Daniel Pfeifer
4ffc408ed9 cmCTest*Command: Loosen coupling with cmArgumentParser
Instead of inheriting from `cmArgumentParser<void>` and binding arguments by
overriding `BindArguments`, define a struct for the arguments and instantiate
a static const parser in the `InitialPass` function of each command.  Pass the
argument struct down to all functions that need to access it.
2024-11-05 10:08:23 +01:00
Daniel Pfeifer
1a2d453b94 cmCTest*Command: Access arguments through an alias
At the top of each function that requires access to arguments,
declare an alias `args = *this`.  Then access all arguments with
`args.` rather than `this->`.  The intention is to make following
changes easier to review.
2024-11-05 10:08:23 +01:00
Daniel Pfeifer
c1de0976f8 cmCTest*Command: Bring all classes to a uniform layout
Make sure that all classes have a public inherited constructor, protected
data members for the arguments, followed by other private virtual functions.
The intention is to make following changes to have a smaller diff.
2024-11-05 10:08:23 +01:00
Daniel Pfeifer
d07a35a336 cmCTest: Remove handler instances 2024-10-29 12:49:22 +01:00
Daniel Pfeifer
f5a314cc35 cmCTestGenericHandler: Add cmCTest* argument to Initialize function 2024-10-23 23:42:14 +02:00
Zack Galbreath
25bf514447 ctest: Add support for writing test results in JUnit XML format
Addresses #18654
2021-04-26 08:55:22 -04:00
Marc Chevrier
8d4a9ee398 Refactoring: rename "cm_static_string_view.hxx" as <cmext/string_view> 2020-04-30 09:53:27 +02:00
Kitware Robot
ed98209ddc Revise include order using clang-format-6.0
Run the `clang-format.bash` script to update our C and C++ code to a new
include order `.clang-format`.  Use `clang-format` version 6.0.
2019-10-01 12:26:36 -04:00
Regina Pfeifer
0aa8a2ab8b cmCTest*Command: Port to cmArgumentParser 2019-09-20 13:27:30 +02:00
Sebastian Holtermann
3b2b02825d Source sweep: Replace std::ostringstream when used with a single append
This replaces `std::ostringstream`, when it is written to only once.
If the single written argument was numeric, `std::to_string` is used instead.
Otherwise, the single written argument is used directly instead of the
`std::ostringstream::str()` invocation.
2019-08-23 18:52:33 +02:00
Sebastian Holtermann
e91bfe440c cmMakefile: Let AddDefinition accept a value as cm::string_view
This changes `cmMakefile::AddDefinition` to take a `cm::string_view` as value
argument instead of a `const char *`.

Benefits are:
- `std::string` can be passed to `cmMakefile::AddDefinition` directly without
  the `c_str()` plus string length recomputation fallback.
- Lengths of literals passed to `cmMakefile::AddDefinition` can be computed at
  compile time.

In various sources uses of `cmMakefile::AddDefinition` are adapted to avoid
`std::string::c_str` calls and the `std::string` is passed directly.
Uses of `cmMakefile::AddDefinition`, where a `nullptr` `const char*` might
be passed to `cmMakefile::AddDefinition` are extended with `nullptr` checks.
2019-07-24 11:11:25 +02:00
Regina Pfeifer
b172a81d55 cmCTest: Use concrete accessor functions for TestingHandlers 2019-03-20 11:39:14 -04:00
Daniel Pfeifer
5962db4389 Use C++11 nullptr 2017-08-24 23:39:47 +02:00
Daniel Pfeifer
a1218f59d9 cmCommand: remove unused methods from interface and all implementations 2017-05-11 19:49:06 +02:00
Daniel Pfeifer
7b4244aceb iwyu: Fix more findings 2016-11-28 14:06:40 -05:00
Betsy McPhail
3a523eec78 ctest_memcheck: Add DEFECT_COUNT option to capture defect count 2016-11-09 15:34:07 -05: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
Kitware Robot
d9fd2f5402 Revise C++ coding style using clang-format
Run the `Utilities/Scripts/clang-format.bash` script to update
all our C++ code to a new style defined by `.clang-format`.
Use `clang-format` version 3.8.

* 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.
2016-05-16 16:05:19 -04:00
Zack Galbreath
0b87b2a339 ctest_memcheck: Add QUIET option 2015-02-23 10:02:00 -05:00
Ben Boeckel
ca9cc25ce8 ctest: add support for additional sanitizer options
Sanitizers receive options through their environment variable; support
user-specified options here.
2014-10-03 13:45:07 -04:00
Bill Hoffman
49948f7221 ctest_memcheck: Add support for ThreadSanitizer
This commit adds support for ThreadSanitizer to ctest.  ThreadSanitizer
is part of the clang compiler and also gcc 4.8 and later. You have to
compile the code with special flags. Then your code gets the the
ThreadSanitizer ability built into it. To pass options to the
ThreadSanitizer you use an environment variable. This commit teaches
ctest to parse the output from ThreadSanitizer and send it to CDash.
2014-07-09 09:48:35 -04:00
Brad King
96afb12087 Convert CMake to OSI-approved BSD License
This converts the CMake license to a pure 3-clause OSI-approved BSD
License.  We drop the previous license clause requiring modified
versions to be plainly marked.  We also update the CMake copyright to
cover the full development time range.
2009-09-28 11:43:28 -04:00
Ken Martin
3d96e52261 STYLE: some m_ to this-> cleanup 2006-03-15 11:02:08 -05:00
Andy Cedilnik
862f5df25c STYLE: Fix some style issues 2006-03-10 15:03:09 -05:00
Andy Cedilnik
1b578d3180 ENH: Several improvements with the way things are handled. Also, support multiple submited files 2005-06-23 13:04:18 -04:00
Andy Cedilnik
d6f77bddc4 ENH: Pass in memcheck command options and suppresions, and change skin to tool 2005-06-15 10:53:49 -04:00
Andy Cedilnik
04f0a634a5 ENH: Add commands for memory checking and coverage 2005-06-14 14:00:45 -04:00