summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
Commit message (Collapse)AuthorAgeFilesLines
* CPack RPM and DEB: improved package version handlingDomen Vrankar2017-09-217-4/+40
| | | | | | | | | Adds support for epoch version to CPackRPM and CPackDeb packagers. Also adds better version checking to CPackDeb that complies with Debian rules. Fixes: #17057
* Merge topic 'refactor-iwyu-code'Brad King2017-09-1517-8/+30
|\ | | | | | | | | | | | | 3bbe95f5 Clean up iwyu code to not be one big if statement. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1247
| * Clean up iwyu code to not be one big if statement.Bill Hoffman2017-09-1317-8/+30
| | | | | | | | | | | | | | | | | | | | This commit changes the internal -E__run_iwyu to be -E__run_co_compile. This is used for co-compile commands. These are tools that want to mirror the compiler. For each compiler invocation the tool will be invoked first. This started as a way to implement include what you use (iwyu), but has expanded to include cpplint, cppcheck and others. Likely there will be more in the future as well. This commit implements each one in its own function and provides a way to add additional ones in the future with less work.
* | Merge topic 'fphsa-fix-version-exact'Brad King2017-09-151-4/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 5dc215e0 FPHSA: fix typo in comment a8f70b32 FPHSA: replace left-over VERSION by _FOUND_VERSION. 549366cb FPHSA: Add (failing) unit test when checking EXACT on full version number Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1259
| * | FPHSA: fix typo in commentYves Frederix2017-09-141-2/+2
| | |
| * | FPHSA: Add (failing) unit test when checking EXACT on full version numberYves Frederix2017-09-141-2/+2
| |/ | | | | | | | | This test detects a regression introduced by commit aec27c152e (FPHSA: use more localized _FOUND_VERSION instead of VERSION, 2017-09-05).
* | Tests: Update RunCMake/README.rst to clarify meaning of -result.txtBrad King2017-09-141-2/+2
| | | | | | | | | | | | | | The content of `-result.txt` files is a regex, but the documentation didn't make this clear. Suggested-by: Deniz Bahadir <dbahadir@benocs.com>
* | get_filename_component: Revise PROGRAM/PROGRAM_ARGS split semanticsBrad King2017-09-131-0/+11
|/ | | | | | | | | | | | | | | | | | | | The KWSys `SystemTools::SplitProgramFromArgs` implementation goes into an infinite loop when the value is just " " (a space). Since the "program path with unquoted spaces plus command-line arguments" operation it is trying to provide is poorly defined (string parsing should not depend on filesystem content), just stop using it. Instead consider the main two use cases the old approach tried to handle: * The value is the name or absolute path of a program with no quoting or escaping, but also no command-line arguments. In this case we can use the value as given with no parsing, and assume no arguments. * The value is a command-line string containing the program name/path plus arguments. In this case we now assume that the command line is properly quoted or escaped. Fixes: #17262
* Merge topic 'vs_improve_custom_command'Brad King2017-09-113-0/+89
|\ | | | | | | | | | | | | | | 9ed24280 VS: only add custom command line if it is not empty 34c4108b add HasOnlyEmptyCommandLines() method to cmCustomCommandGenerator Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1050
| * VS: only add custom command line if it is not emptyMichael Stürmer2017-09-043-0/+89
| |
* | Merge topic 'timestamp'Brad King2017-09-112-2/+2
|\ \ | | | | | | | | | | | | | | | | | | 014ad298 Timestamp: support %A and %B Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1228
| * | Timestamp: support %A and %BBernhard M. Wiedemann2017-09-072-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | These are defined both by [1] and [2] to give full names of a weekday and month. [1] http://pubs.opengroup.org/onlinepubs/009695399/functions/strftime.html [2] https://msdn.microsoft.com/de-de/library/fe06s4ak.aspx
* | | CTest: Weight reported test times by PROCESSORS in summariesBill Hoffman2017-09-088-15/+15
| | | | | | | | | | | | | | | | | | This commit changes the times reported by labels and subprojects to be weighted by the PROCESSORS property. It is reported with `sec*proc` instead of just `sec`.
* | | CTest: Split out labels and subproject labels in summary outputBill Hoffman2017-09-085-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | This commit splits out the reporting of labels and labels used for sub projects. If a label is a sub project label it will not be included in the label summary. To implement this the commit creates PrintLabelOrSubprojectSummary which is able to do the work of both PrintLabelSummary and PrintSubprojectSummary avoiding code duplication.
* | | Merge topic 'fphsa-version-cleanup'Brad King2017-09-086-0/+23
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | 91935d9e FPHSA: lower-case for cmake_parse_arguments + move config-mode related code aec27c15 FPHSA: use more localized _FOUND_VERSION instead of VERSION. 0019bfeb FPHSA: Add (failing) unit test in case a cache variable VERSION is present 81844334 FPHSA: add (failing) unit test for found version being equal to 0. Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Rolf Eike Beer <eike@sf-mail.de> Merge-request: !1224
| * | FPHSA: Add (failing) unit test in case a cache variable VERSION is presentYves Frederix2017-09-054-1/+15
| | |
| * | FPHSA: add (failing) unit test for found version being equal to 0.Yves Frederix2017-09-053-0/+9
| | |
* | | Merge topic 'ExternalProject-command'Brad King2017-09-053-0/+55
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | 15617484 ExternalProject: Prevent COMMAND from being treated as a true keyword Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1178
| * | ExternalProject: Prevent COMMAND from being treated as a true keywordCraig Scott2017-09-023-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The known keywords for each function are obtained by scraping the documentation for lines matching a particular regular expression. In commit 8842a027 (ExternalProject: Improve documentation, 2017-07-09), the docs were overhauled and the COMMAND docs subsequently matched the regular expression when they shouldn't have. This made COMMAND appear as a true keyword, which thwarted the special handling logic elsewhere for the intended use of COMMAND arguments. This commit contains a workaround for issue #17229 to force a dependency of the patch step on the update step to ensure a predictable step order. Fixes: #17198
* | | Merge topic 'tll-global-unknown-lib'Brad King2017-09-012-0/+5
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | a47a8533 target_link_libraries: Allow linking to UNKNOWN IMPORTED GLOBAL libs Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1220
| * | | target_link_libraries: Allow linking to UNKNOWN IMPORTED GLOBAL libsBrad King2017-08-312-0/+5
| | |/ | |/| | | | | | | | | | | | | This combination was accidentally rejected. Allow it and add a test. Fixes: #17245
* | | Merge topic 'fix-genex-SOURCES'Brad King2017-09-015-0/+15
|\ \ \ | |/ / |/| | | | | | | | | | | | | | 068cc545 Genex: Fix TARGET_PROPERTY value of SOURCES Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1218
| * | Genex: Fix TARGET_PROPERTY value of SOURCESBrad King2017-09-015-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactoring in commit v3.8.0-rc1~445^2~2 (cmTarget: Move sanity checks and computed property access to callers, 2016-10-13) exposed a typo in commit v3.8.0-rc1~445^2~3 (cmGeneratorTarget: Implement cmTargetPropertyComputer interface, 2016-10-13). Together they broke the `$<TARGET_PROPERTY:mytgt,SOURCES>` generator expression in the case that the `SOURCES` target property is populated in part by the `target_sources` command. Add the missing `;`-separator. Fixes: #17243
| * | Merge branch 'find-package_root-disable' into release-3.9Brad King2017-08-103-0/+3
| |\ \ | | | | | | | | | | | | Merge-request: !1116
* | \ \ Merge topic 'lexer-null'Brad King2017-08-314-0/+7
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 14d9a11b ListFileLexer: fix heap-buffer-overflow on malicious input Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1153
| * | | | ListFileLexer: fix heap-buffer-overflow on malicious inputMatthias Maennich2017-08-304-0/+7
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case a list file contains a null terminated string that is continued until a later space, the lexer token information got inconsistent: e.g. an argument "TEST\0FOOBAR" is passed by the lexer as a token char* = "TEST\0FOOBAR" and length 11 ^^ note: ascii 0x00 Using strdup in cmListFileLexer leads lexer->token.text to be allocated with size 5 and lexer->token.length to be set to 11 A subsequent call to this function with an argument of 5 < length <= 11 wrongly assumed a sufficiently sized buffer and therefore corrupted the heap buffer. The program might crash due to this corruption. The case "NullTerminatedArgument" is intentionally using a quite large 'rest' to increase the chance to actually hit the issue. It will reliably crash with address sanitizer enabled though. This fix addresses all rules where arbitrary characters are matched to ignore \0 in order to fall through to the rule that matches an arbitrary character as BadCharacter. Signed-off-by: Matthias Maennich <matthias@maennich.net>
* | | | Add properties to run cppcheck along with the compilerBill Hoffman2017-08-3015-1/+74
|/ / / | | | | | | | | | | | | | | | Create a `<LANG>_CPPCHECK` target property (initialized by a `CMAKE_<LANG>_CPPCHECK` variable) to specify a `cppcheck` command line to be run along with the compiler.
* | | Avoid CRLF newlines in Git repo blobsBrad King2017-08-303-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | In commit 8ed03baa76 (gitattributes: prefer `eol=crlf` to `-crlf`, 2017-08-23) we left a few CRLF blobs in the repository. Some Git versions get confused by text files with CRLF blobs. Convert them to LF blobs. Use the `eol=crlf` attribute to tell Git to use CRLF on checkout.
* | | Tests: Fix RunCMake.BuildDepends on VS 2017 with v90 toolsetBrad King2017-08-251-1/+2
| | | | | | | | | | | | | | | The MSVC toolsets v100 and below forget to re-link when a manifest changes. Exclude this part of the test case for them.
* | | CPack: extend testing frameworkDomen Vrankar2017-08-192-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some CPack tests require running commands after the inclusion of CPack.cmake and this patch enables such tests to declare run_after_include_cpack function which is run after the inclusion.
* | | Add PREPEND sub-command to string commandSylvain Joubert2017-08-115-0/+67
| | |
* | | Merge topic 'find-package_root-test-regex'Brad King2017-08-106-465/+480
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | e574bce1 Tests: Simplify RunCMake.find_package PackageRoot case regexes Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Chuck Atkins <chuck.atkins@kitware.com> Merge-request: !1115
| * | Tests: Simplify RunCMake.find_package PackageRoot case regexesBrad King2017-08-086-465/+480
| | |
* | | Merge topic 'find-package_root-disable'Brad King2017-08-103-0/+3
|\ \ \ | | |/ | |/| | | | | | | | | | | | | 578d95f8 find_*: Disable the PACKAGE_ROOT search path group for CMake 3.9 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1116
| * | find_*: Disable the PACKAGE_ROOT search path group for CMake 3.9Brad King2017-08-083-0/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disable the feature added by commit v3.9.0-rc1~71^2~2 (find_*: Add a new PackageRoot search path group, 2017-05-03) and remove documentation added by commit v3.9.0-rc1~71^2 (find_*: Add docs for PackageRoot search path group, 2017-05-03). Unfortunately the name `<pkg>_ROOT` may already be set by projects for their own incompatible purposes. Disable the behavior change for now to fix the regression for CMake 3.9. We can restore it later with a policy. In order to keep the implementation and tests working, add an undocumented variable we can use in the tests to enable the behavior before the policy is introduced. Fixes: #17144
* | Merge topic 'gtest-dynamic-discovery'Brad King2017-08-086-0/+111
|\ \ | | | | | | | | | | | | | | | | | | bfcda401 Add dynamic test discovery for for Google Test Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1056
| * | Add dynamic test discovery for for Google TestMatthew Woehlke2017-07-276-0/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new gtest_discover_tests function to GoogleTest.cmake, implementing dynamic test discovery (i.e. tests are discovered by actually running the test executable and asking for the list of available tests, which is used to dynamically declare the tests) rather than the source-parsing approach used by gtest_add_tests. Compared to the source-parsing approach, this has the advantage of being robust against users declaring tests in unusual ways, and much better support for advanced features such as parameterized tests. A unit test, modeled after the TEST_INCLUDE_DIR[S] test, is also included. Note that the unit test does not actually require that Google Test is available. The new functionality does not actually depend on Google Test as such; it only requires that the test executable lists tests in the expected format when invoked with --gtest_list_tests, which the unit test can fake readily.
* | | HP-UX: Drop support for building CMake on HP-UXBrad King2017-08-071-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | CMake will soon require both C++11 and libuv to build. Neither of these works on HP-UX, so unfortunately we need to drop support for the platform until someone can get them working. Issue: #17137
* | | Merge topic 'genex-error-grammar'Brad King2017-08-047-14/+14
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | e49c9eec cmGeneratorExpressionNode: add some missing commas Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1102
| * | | cmGeneratorExpressionNode: add some missing commasBen Boeckel2017-08-037-14/+14
| | | |
* | | | Merge topic 'add-package_root-to-find_package'Brad King2017-08-0412-461/+919
|\ \ \ \ | |/ / / |/| | / | | |/ | |/| | | | | | | | | | | | | 4a207116 find_package: Split PACKAGE_ROOT tests to work with smaller regex 9722ff5a find_package: Fix PACKAGE_ROOT test to check find_pacakge(CONFIG) mode. c5d2b99c find_package: Add missing PACKAGE_ROOT_PATH search path implementation. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1082
| * | find_package: Split PACKAGE_ROOT tests to work with smaller regexChuck Atkins2017-08-027-846/+872
| | |
| * | find_package: Fix PACKAGE_ROOT test to check find_pacakge(CONFIG) mode.Chuck Atkins2017-07-287-99/+531
| | |
| * | Merge branch 'objlib-own-target-objs' into release-3.9Brad King2017-07-174-0/+9
| |\ \
* | \ \ Merge topic 'string-clear-intermediate-matches'Brad King2017-07-213-0/+33
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b7941641 cmStringCommand: clear intermediate matches Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1065
| * | | | cmStringCommand: clear intermediate matchesBen Boeckel2017-07-213-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When `string(REGEX REPLACE)` or `string(REGEX MATCHALL)` loop internally, they store their matches, but they do not clear the previous match from an earlier iteration. This can leave the contents of `CMAKE_MATCH_<N>` with bogus values for later matches in the string if they have groups which earlier matched a non-empty string, but now match an empty string. Fixes #17079.
* | | | | Merge topic 'docsExternalProject'Brad King2017-07-213-6/+6
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8842a027 ExternalProject: Improve documentation Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1037
| * | | | | ExternalProject: Improve documentationCraig Scott2017-07-173-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added clearer structure by grouping the options into logical sections. - Expanded the details for many of the options. - Added Examples section to show how to use the various commands. - Specifically highlighted that the contents of SOURCE_DIR may be lost if a download method is also provided. - Updated argument-matching regex to be more robust and account for the varying leading spaces before keywords in the docs. - Updated tests to account for slightly changed error messages.
* | | | | | Merge topic 'cmake-E-sha'Brad King2017-07-1840-0/+64
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c4de0a25 Add sha1sum, sha224sum, sha256sum, sha384sum and sha512sum to command mode c4647d84 Change ComputeFileMD5 to ComputeFileHash 501a4fee Add some unit tests for md5sum Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1021
| * | | | | | Add sha1sum, sha224sum, sha256sum, sha384sum and sha512sum to command modeAndré Klitzing2017-07-1431-0/+47
| | | | | | |