Commit Graph

1223 Commits

Author SHA1 Message Date
Daniel Pfeifer
b932cd4298 clang-tidy: apply misc-redundant-expression fixes 2016-12-12 14:04:16 -05:00
Daniel Pfeifer
58c66393cf clang-tidy: apply readability-static-definition-in-anonymous-namespace fixes 2016-12-12 14:04:15 -05:00
Daniel Pfeifer
2988abd939 clang-tidy: apply modernize-use-bool-literals fixes 2016-12-12 14:04:14 -05:00
Daniel Pfeifer
a74e689348 clang-tidy: apply readability-redundant-string-init fixes 2016-12-12 14:04:13 -05:00
Daniel Pfeifer
1af67b199a cmCTestTestHandler: use multimap 2016-12-03 14:54:52 +01:00
Dāvis Mosāns
076aef8e45 Windows: Use UTF-8 for pipes in CMake, CTest and CPack
Applications which process CMake output will need to decode it as UTF-8
instead of console's codepage.
2016-11-30 00:38:48 +02:00
Daniel Pfeifer
7b4244aceb iwyu: Fix more findings 2016-11-28 14:06:40 -05:00
Brad King
8dd3c319c9 Merge topic 'improve_ctest_memcheck_output'
f0d50957 ctest: Improve output for `-T memcheck`
2016-11-17 09:40:26 -05:00
Bill Hoffman
f0d50957b9 ctest: Improve output for -T memcheck
Show how many defects each test that had a defect produced.
Also tell the user where to find the full log files.
2016-11-17 09:38:06 -05:00
Dāvis Mosāns
f55fcdc859 CTest: Use UTF-8 encoding for output from Git 2016-11-15 10:02:47 -05:00
Dāvis Mosāns
40bd42dfbc Add Encoding option for RunChild, RunMakeCommand and RunProcess 2016-11-15 01:00:46 +02:00
Dāvis Mosāns
595feb3234 Windows: Encode child process output to internally-used encoding
Typically Windows applications (eg. MSVC compiler) use current console's
codepage for output to pipes so we need to encode that to our
internally-used encoding (`KWSYS_ENCODING_DEFAULT_CODEPAGE`).
2016-11-14 21:21:20 +02:00
Brad King
92c865b8f5 cmCTestBuildHandler: Use size_t in ProcessBuffer length argument 2016-11-14 21:21:19 +02:00
Brad King
8b33507aba Merge topic 'cdash_version_check'
d3633731 Do not query CDash for version
f725b20b Update tests that expect uncompressed output
2016-11-11 10:44:24 -05:00
Brad King
6338652a87 Merge topic 'ctest_memcheck_defect_count'
3a523eec ctest_memcheck: Add DEFECT_COUNT option to capture defect count
2016-11-11 10:44:13 -05:00
Brad King
de53eb18ab Merge topic 'import-librhash'
cd8a57ae Add option to build CMake against a system librhash
71180fc8 FindLibRHash: Add module to find the librhash package
3216e94c Remove unused cm_sha2 infrastructure
5420278d Port hash computation to cmCryptoHash
9a596b33 cmCryptoHash: Re-implement in terms of librhash
47f91a61 cmCryptoHash: Avoid using subclasses at client sites
d0ff3e70 librhash: Port to KWIML for ABI and integer type information
465a85fb librhash: Avoid signed left-shift overflow
fc2cb74f librhash: Implement bswap_32 as a function even in strict C90 mode
0bd333bc librhash: Implement bswap_64 even in strict C90 mode
7189d62c librhash: Use __builtin_bswap{32,64} on Clang
af7ebf8a librhash: Install COPYING file with CMake documentation
bb01f20e librhash: Disable warnings to avoid changing 3rd party code
31bb727f librhash: Build the library within CMake
53048afa librhash: Remove source fragments not needed for CMake
5cb1b345 Merge branch 'upstream-librhash' into import-librhash
...
2016-11-10 08:34:28 -05:00
Brad King
5420278dc8 Port hash computation to cmCryptoHash
Avoid using KWSys MD5 or `cm_sha2` and use the `cmCryptoHash`
abstraction instead.
2016-11-10 08:29:38 -05:00
Betsy McPhail
3a523eec78 ctest_memcheck: Add DEFECT_COUNT option to capture defect count 2016-11-09 15:34:07 -05:00
Zack Galbreath
d3633731ab Do not query CDash for version
This check was not functioning properly for the following reasons:

* The "DropSite" and "DropLocation" CTest Configurations do not
get set until ctest_submit() is called.  So if ctest_submit()
was not called before ctest_test() we would end up with uncompressed
output, even if the CDash server was new enough to support this feature.

* CDash's API is now versioned. The current location to query is
now /api/v1/getversion.php, not /api/getversion.php.

As a result of these issues, CTest would not compress test/memcheck
output when it should.  Rather than fix this check, we now assume that
CTest is communicating with a new enough version of CDash.  This behavior
can be controlled through the use of the --no-compress-output command-line
argument.
2016-11-08 15:58:50 -05:00
Brad King
666bb0e3fa Merge topic 'include-what-you-use'
2e620f0b Fix several include-what-you-use findings
2016-11-08 09:44:40 -05:00
Daniel Pfeifer
2e620f0b38 Fix several include-what-you-use findings 2016-11-08 09:42:04 -05:00
Daniel Pfeifer
5ae3966d75 cmCTestSubmitHandler: Remove redundant c_str() 2016-11-05 23:46:24 +01:00
Daniel Pfeifer
15aa814b85 Remove cmObject.h and cmTypeMacro.h 2016-10-24 21:49:28 +02:00
Daniel Pfeifer
fb0b087c4d Make cmCTestGenericHandler not inherit from cmObject 2016-10-23 00:59:55 +02:00
Daniel Pfeifer
9855ebf11a Make cmCommand not inherit from cmObject 2016-10-23 00:45:08 +02:00
Stephen Kelly
e6eecec761 cmListFileCache: Remove cmState header include
Include it in dependents which have previously relied on it
transitively.
2016-10-19 15:41:00 +02:00
Stephen Kelly
a91eaf3872 cmState: Port dependents to new cmStateTypes header 2016-10-19 15:40:59 +02:00
Stephen Kelly
cde6eb6249 cmState: Port dependent code to new cmStateSnapshot name 2016-10-19 15:40:59 +02:00
Brad King
a5f0e62988 Merge topic 'timeout_after_match_testtime'
909842ff CTest: report time spent after matching output
2016-10-18 08:43:03 -04:00
Zack Galbreath
909842fff9 CTest: report time spent after matching output
When using the TIMEOUT_AFTER_MATCH test property, only report the
time spent by the test after the matching output was found.
2016-10-17 11:24:32 -04:00
Bill Hoffman
19beee46cc ctest_configure: Propagate CTEST_USE_LAUNCHERS from caller to project
If `CTEST_USE_LAUNCHERS` is `TRUE` in a CTest script then the
`ctest_configure` command will add `-DCTEST_USE_LAUNCHERS:BOOL=TRUE` to
the cmake command used to configure the project.  This allows a project
to only set `CTEST_USE_LAUNCHERS` in a ctest script and have launchers
work.
2016-10-17 11:15:36 -04:00
Brad King
5385817762 Do not define cout/cerr preprocessor symbols
Apply the change from commit bd3d0eaf (cmCTest: don't redefine cout and
cerr, 2016-09-01) to the rest of ctest and cpack.  These definitions
are no longer needed because our conventions are well established.
2016-10-04 09:34:37 -04: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
Brad King
f4475eb92b Merge topic 'test-fixtures'
73f47c9e CTest: Add support for test fixtures
2016-09-22 08:09:55 -04:00
Brad King
2c2ffd3874 Merge topic 'ctest-capture-error'
adf1e32f Help: Add notes for topic 'ctest-capture-error'
d328dc68 CTest: Add CAPTURE_CMAKE_ERROR val to `ctest_*` commands
9ac2e189 ctest_coverage: If gcov is not found just warn, not error
2016-09-21 08:47:51 -04:00
Craig Scott
73f47c9e46 CTest: Add support for test fixtures
Add new test properties:

* FIXTURES_SETUP
* FIXTURES_CLEANUP
* FIXTURES_REQUIRED

to specify the roles and dependencies of tests providing/using
test fixtures.
2016-09-20 14:37:38 -04:00
Bill Hoffman
d328dc6853 CTest: Add CAPTURE_CMAKE_ERROR val to ctest_* commands
If a `ctest_*` command has CAPTURE_CMAKE_ERROR then any errors generated
by cmake during that command will cause the value to be assigned `-1`.
This will prevent a `ctest -S` script from returning non-zero unless the
script explicitly calls `message(FATAL_ERROR)`.
2016-09-20 13:14:20 -04:00
Bill Hoffman
9ac2e18960 ctest_coverage: If gcov is not found just warn, not error 2016-09-20 13:06:57 -04:00
Nils Gladitz
b35311ca44 CTestSVN: Fix segfault when CTEST_UPDATE_VERSION_ONLY is enabled
Before the change the list of externals was queried only
before the svn update.

With the change the list is queried both before and after.
This should also be more accurate since the list of externals might
change during the update.
2016-09-12 19:40:13 +02:00
Daniel Pfeifer
1a9de8035c surround macro arguments with parentheses 2016-09-05 22:09:49 +02:00
Daniel Pfeifer
3849164454 CTest: fix include-what-you-use violations 2016-08-25 09:34:37 -04:00
Daniel Pfeifer
5cbb548807 fix a batch of include-what-you-use violations 2016-08-24 00:29:15 +02:00
Daniel Pfeifer
50ad1e0a14 CTest: don't use else after return 2016-08-18 20:04:21 +02:00
Daniel Pfeifer
e7b842e189 Make sure unnused parameters are /*named*/ 2016-08-17 01:49:57 +02:00
Dāvis Mosāns
b1f87a50b3 Use better KWSys SystemTools::GetEnv and HasEnv signatures 2016-07-18 09:51:01 -04:00
Brad King
b5ec5b0901 Avoid using KWSys auto_ptr by adopting it ourselves
Replace use of cmsys::auto_ptr with a CM_AUTO_PTR macro that maps to
our own implementation adopted from the KWSys auto_ptr implementation.
Later we may be able to map CM_AUTO_PTR to std::auto_ptr on compilers
that do not warn about it.

Automate the client site conversions:

    git grep -l auto_ptr -- Source/ | grep -v Source/kwsys/ | xargs sed -i \
      's|cmsys::auto_ptr|CM_AUTO_PTR|;s|cmsys/auto_ptr.hxx|cm_auto_ptr.hxx|'
2016-06-29 09:47:58 -04:00
Daniel Pfeifer
1d6909a287 use CM_NULLPTR 2016-06-28 09:02:26 -04:00
Daniel Pfeifer
a7a9239096 mark functions with CM_OVERRIDE 2016-06-27 23:24:38 +02:00
Daniel Pfeifer
7647f6afa4 Add CM_OVERRIDE to some functions
Run clang-tidy's modernize-use-override checker.  This checker must have
issues in version 3.8.  It has way too little matches.  And it adds
override to destructors.  Revert the changes on the destructors and
change override to CM_OVERRIDE.
2016-06-27 10:37:41 -04:00
Daniel Pfeifer
24ab29b882 Prefer istringstream and ostringstream over stringstream.
Use istringsream for parsing, ostringstream for generation.
2016-06-14 22:37:36 +02:00