1481 Commits

Author SHA1 Message Date
Shane Parris
754e39dd36 Add testcases for file(DOWNLOAD|UPLOAD) netrc options 2017-10-18 15:21:42 -04:00
Brad King
344d149ae4 VS,Xcode: Add CMakeLists.txt sources without mutating targets
Rather than injecting `CMakeLists.txt` files into each target's
`SOURCES`, teach the generators to add them during generation using
dedicated code.  This avoids mutating the original targets, and avoids
polluting `$<TARGET_PROPERTY:foo,SOURCES>` with generator-specific
content.

This also avoids listing the `CMakeLists.txt` sources in the results of
`CMAKE_DEBUG_TARGET_PROPERTIES==SOURCES` so the `RunCMake.TargetSources`
test no longer needs a separate case for IDEs.
2017-10-18 14:24:07 -04:00
Brad King
0dba1db9d5 Merge topic 'module-fetchcontent'
1e56634f FetchContent: Add tests
60e74d2f FetchContent: New module for populating content at configure time

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1306
2017-10-18 09:37:26 -04:00
Craig Scott
1e56634faa FetchContent: Add tests 2017-10-17 08:10:19 +11:00
Brad King
4594880be7 Merge topic 'cpack-deb-mr-1296-fix'
c5db2f9a CPack/Deb: fix for regex passing even if invalid characters are present
529729d6 CPack/Deb: CPACK_DEBIAN_PACKAGE_VERSION regex testing exception

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1375
2017-10-11 08:26:24 -04:00
Brad King
155c1505a5 Merge branch 'cpack-deb-mr-1296-fix' into release-3.10
Merge-request: !1375
2017-10-11 08:25:30 -04:00
Domen Vrankar
529729d6e7 CPack/Deb: CPACK_DEBIAN_PACKAGE_VERSION regex testing exception
CPACK_DEBIAN_PACKAGE_VERSION variable could in the past also
contain release and epoch version so regex test should expect
the entire versioning if both CPACK_DEBIAN_PACKAGE_RELEASE
and CPACK_DEBIAN_PACKAGE_EPOCH are not set.
Also since the checks were not performed in the past the regex
test of CPACK_DEBIAN_PACKAGE_VERSION variable content should
only report author warnings instead of errors in case of the
test fail.

Fixes: #17339
2017-10-11 00:10:01 +02:00
Brad King
0be7d61abf Tests: Teach RunCMake to ignore clang unused sanitizer flag warnings
These can show up in Release builds of CMake because some tests still
build Debug.
2017-10-10 09:37:49 -04:00
Brad King
3f567a9847 Tests: Refactor RunCMake output line ignore regex construction
Avoid one giant line.
2017-10-10 09:35:31 -04:00
Gregor Jasny
3a49b4eb78 Xcode 9: Lower iOS deployment version to get armv7 builds 2017-10-10 09:08:44 -04:00
Gregor Jasny
78a560e42b Revert "Xcode: Adjust tests to drop of 32bit iOS architectures"
This reverts commit d210b2813072c874ee13fcc941e41aacacf09874.
2017-10-10 09:08:44 -04:00
Gregor Jasny
d210b28130 Xcode: Adjust tests to drop of 32bit iOS architectures 2017-10-05 14:10:28 +02:00
Brad King
58d9297eef Tests: Fix RunCMake.Framework ios arch for Xcode 9
Xcode 9 comes with the iPhoneOS 11.0 SDK that does not support the
`armv7` architecture.  For this SDK version and newer, use `arm64`.
2017-10-03 09:09:08 -04:00
Brad King
b8dd7a705c Tests: Fix RunCMake.Framework expected output on macOS 10.13
The archiver output in the case of universal binaries has changed
slightly.  Update our expected output to match.  While at it, drop
unnecessary leading and trailing `.*`.
2017-10-03 09:08:27 -04:00
Brad King
c044b9ae84 FindBoost: Improve messages when a Boost CMake package is found
Add a test for this case to verify the messages.  This test will also be
valuable to cover this code path in which we've had several regressions
recently.
2017-09-29 10:10:01 -04:00
Brad King
f9c619105c Merge topic 'GetPrerequisites-no-clear-on-missing'
1a7b8c83 GetPrerequisites: Restore behavior on missing binary of not clearing list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1312
2017-09-27 07:16:06 -04:00
Brad King
09350f19e0 Merge topic 'revert-perf-source-lookup'
a7005c98 Tests: Add case for legacy source file property behavior
1604716d Revert "Performance: Improve efficiency of source file lookup in cmMakefile"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1308
2017-09-27 07:11:07 -04:00
Brad King
1a7b8c8321 GetPrerequisites: Restore behavior on missing binary of not clearing list
Prior to commit v3.4.0-rc1~264^2~1 (GetPrerequisites: Add error checks
for execute_process() calls, 2015-07-29), `get_prerequisites` would
simply warn on a missing binary and not update the result list at all.
That commit accidentally made the case an error.  This was fixed by
commit v3.8.0-rc1~110^2 (GetPrerequisites: Do not fail on files we
cannot find, 2017-01-10), but the fix also cleared the result list.
Clearing the list is incorrect because it is supposed to be able to
accumulate results over multiple calls.

Remove the list clearing behavior to restore the original behavior on a
missing binary.

Fixes: #17306
2017-09-26 07:31:33 -04:00
Brad King
a7005c985d Tests: Add case for legacy source file property behavior
The change in commit 3b95ab5693 (Performance: Improve efficiency of
source file lookup in cmMakefile, 2017-08-17) broke some legacy behavior
of source file properties in which the order sources are first resolved
with extensions affects how setting properties without extensions works.
It has been reverted for now, but the discovery was made after merging
because the broken case was not covered by our test suite.

Add a test case representing the legacy behavior.

Issue: #15208
2017-09-25 09:06:35 -04:00
Brad King
6d20eda21a Merge topic 'test-fix-msvc-standard-default'
a5dd1599 Tests: Fix RunCMake.try_compile CxxStandard case on MSVC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1302
2017-09-25 08:55:24 -04:00
Brad King
33eec57232 Merge topic 'cpack-rpm-deb-version'
74b7457f CPack RPM and DEB: improved package version handling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1296
2017-09-22 10:14:49 -04:00
Brad King
a5dd159990 Tests: Fix RunCMake.try_compile CxxStandard case on MSVC
In post-3.9 development we've taught CMake to understand C++ language
standards for MSVC.  The RunCMake.try_compile test needs to know whether
to expect support or not.  Previously we depended on the host CMake
version to know this, but CMake 3.9 and below do not.  Add special logic
to the test to account for this.
2017-09-22 09:41:07 -04:00
Domen Vrankar
74b7457f12 CPack RPM and DEB: improved package version handling
Adds support for epoch version to CPackRPM and
CPackDeb packagers.
Also adds better version checking to CPackDeb
that complies with Debian rules.

Fixes: #17057
2017-09-21 19:54:17 +02:00
Justin Berger
28d2c6ef7e test: Added additional unit test to variable_watch
This tests adding a variable_watch inside the callback to an existing
callback
2017-09-21 11:09:24 -04:00
Brad King
5737bb3756 Merge topic 'cpack-different-checksum-file-per-generator'
b06870e5 CPack: use a distinct checksum file for each generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1291
2017-09-21 08:19:52 -04:00
Brad King
5c5b28dd9d Merge topic 'cpack-check-install-script'
09166339 CPack: Add missing check for CPACK_INSTALL_SCRIPT variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1090
2017-09-21 08:19:11 -04:00
Brad King
cc5600f9fd Merge topic 'test_for_missing_sources'
55ed21e7 Tests: Add tests for missing sources in add_executable and add_library.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1269
2017-09-21 08:17:18 -04:00
Domen Vrankar
b06870e5ff CPack: use a distinct checksum file for each generator
Different CPack generators could produce checksum files with the same
name which were overwritten by each other since only package name
without extensions was used for checksum file name generation.  This
patch adds package extension to checksum files to prevent collisions.

Fixes: #16840
2017-09-20 14:01:23 -04:00
Alex Turbov
091663395e CPack: Add missing check for CPACK_INSTALL_SCRIPT variable
Also add a test case that uses CPACK_INSTALL_SCRIPT.

Co-Author: Domen Vrankar <domen.vrankar@gmail.com>
Fixes: #15005
2017-09-20 13:33:22 -04:00
Deniz Bahadir
55ed21e72e Tests: Add tests for missing sources in add_executable and add_library. 2017-09-20 07:35:09 -04:00
Brad King
c0c5f924fe Merge topic 'refactor-iwyu-code'
3bbe95f5 Clean up iwyu code to not be one big if statement.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1247
2017-09-15 08:54:32 -04:00
Brad King
ead879df20 Merge topic 'fphsa-fix-version-exact'
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
2017-09-15 08:42:16 -04:00
Brad King
a7a6ae5edd Tests: Update RunCMake/README.rst to clarify meaning of -result.txt
The content of `-result.txt` files is a regex, but the documentation
didn't make this clear.

Suggested-by: Deniz Bahadir <dbahadir@benocs.com>
2017-09-14 14:15:26 -04:00
Yves Frederix
5dc215e03b FPHSA: fix typo in comment 2017-09-14 08:21:38 -04:00
Yves Frederix
549366cbfc FPHSA: Add (failing) unit test when checking EXACT on full version number
This test detects a regression introduced by commit aec27c152e (FPHSA:
use more localized _FOUND_VERSION instead of VERSION, 2017-09-05).
2017-09-14 08:21:22 -04:00
Bill Hoffman
3bbe95f58a Clean up iwyu code to not be one big if statement.
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.
2017-09-13 17:44:49 -04:00
Brad King
31f73eb12d get_filename_component: Revise PROGRAM/PROGRAM_ARGS split semantics
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
2017-09-13 10:47:04 -04:00
Brad King
28adf3833c Merge topic 'vs_improve_custom_command'
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
2017-09-11 07:53:18 -04:00
Brad King
bf19bb5609 Merge topic 'timestamp'
014ad298 Timestamp: support %A and %B

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1228
2017-09-11 07:49:40 -04:00
Bill Hoffman
5b829c89b8 CTest: Weight reported test times by PROCESSORS in summaries
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`.
2017-09-08 10:03:01 -04:00
Bill Hoffman
a6e32eb0c2 CTest: Split out labels and subproject labels in summary output
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.
2017-09-08 10:02:39 -04:00
Brad King
d4f58a9cd8 Merge topic 'fphsa-version-cleanup'
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
2017-09-08 09:48:15 -04:00
Bernhard M. Wiedemann
014ad2989c Timestamp: support %A and %B
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
2017-09-07 13:36:11 -04:00
Yves Frederix
0019bfebc9 FPHSA: Add (failing) unit test in case a cache variable VERSION is present 2017-09-05 21:20:00 +02:00
Yves Frederix
8184433428 FPHSA: add (failing) unit test for found version being equal to 0. 2017-09-05 21:18:34 +02:00
Brad King
20e5f7a9c9 Merge topic 'ExternalProject-command'
15617484 ExternalProject: Prevent COMMAND from being treated as a true keyword

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1178
2017-09-05 09:31:06 -04:00
Michael Stürmer
9ed2428078 VS: only add custom command line if it is not empty 2017-09-04 11:42:35 +02:00
Craig Scott
1561748496 ExternalProject: Prevent COMMAND from being treated as a true keyword
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
2017-09-02 17:53:16 +10:00
Brad King
b568a18997 Merge topic 'tll-global-unknown-lib'
a47a8533 target_link_libraries: Allow linking to UNKNOWN IMPORTED GLOBAL libs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1220
2017-09-01 10:26:08 -04:00
Brad King
bd77717800 Merge topic 'fix-genex-SOURCES'
068cc545 Genex: Fix TARGET_PROPERTY value of SOURCES

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1218
2017-09-01 10:25:08 -04:00