Commit Graph

5251 Commits

Author SHA1 Message Date
Brad King
b104bcfd98 Merge topic 'typos'
777e87ae Fix trivial typos in text

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1442
2017-11-06 09:02:23 -05:00
Brad King
62d736f74a Merge topic 'test-contract-refactor'
4c626b7e Tests: Refactor contract test activation
4bd5af63 Tests: Factor out contract test HOME finding
0ce082b7 Tests: Drop unused contract test environment script
36346de4 Tests: Drop unused contract test
bbc9c966 Tests: Honor already-set CTEST_REAL_HOME in case of repeat run

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1444
2017-11-06 09:01:49 -05:00
Brad King
6a54dbe8ca Merge topic 'test-crash-ubsan'
701a637e Tests: Fix CTestTestCrash test under ubsan

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1443
2017-11-06 09:00:44 -05:00
Brad King
73db89c2c2 Merge topic 'server-refactor'
39c2feaf misc: Added utility method to allow working with stacks
f5d2988e server: Swapped to cm_thread impl
2636d86c utility: Added minimal std::thread drop-in
d46b4ba8 server: Updated server tests to try various communication channels
08dca583 Tests: reworked server tests to allow other operation modes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1230
2017-11-06 08:58:11 -05:00
Brad King
4c626b7e43 Tests: Refactor contract test activation
Use separate `CMake_TEST_CONTRACT_<project>` variables for each test.
Make the set of possible tests match what is in the source tree.
2017-11-03 11:35:06 -04:00
Brad King
4bd5af6302 Tests: Factor out contract test HOME finding 2017-11-03 11:35:06 -04:00
Brad King
0ce082b7c8 Tests: Drop unused contract test environment script
`Trilinos/EnvScript.cmake` has machine-specific content that has been
moved to the respective machines.
2017-11-03 11:32:06 -04:00
Brad King
36346de480 Tests: Drop unused contract test 2017-11-03 11:30:26 -04:00
Brad King
bbc9c96691 Tests: Honor already-set CTEST_REAL_HOME in case of repeat run 2017-11-03 11:30:21 -04:00
Brad King
701a637e4d Tests: Fix CTestTestCrash test under ubsan
UBsan causes our test crash to abort instead.  Update our regex to
tolerate this.
2017-11-03 11:23:33 -04:00
luzpaz
777e87ae00 Fix trivial typos in text
Some are user facing.

Found using

    codespell -q 3 --skip="./Utilities" -I .cmake-whitelist.txt`

whereby the whitelist contained:

    ans
    dum
    helpfull
    emmited
    emmitted
    buil
    iff
    isnt
    nto
    ot
    pathes
    substract
    te
    todays
    upto
    whitespaces
2017-11-03 10:25:05 -04:00
Justin Berger
d46b4ba835 server: Updated server tests to try various communication channels 2017-11-01 11:30:35 -06:00
Brad King
a0ec14d363 Add deprecation warnings for policies CMP0054 and below
The OLD behaviors of all policies are deprecated, but only by
documentation.  Add an explicit deprecation diagnostic for some policies
to encourage projects to port away from setting policies to OLD.
2017-11-01 11:46:53 -04:00
Brad King
77e758a3ed Merge topic 'autogen-moc-predefs-no-moc-options'
4e46f97c Merge branch 'backport-3.9' into autogen-moc-predefs-no-moc-options
978c98b7 Autogen: Don't add AUTOMOC_MOC_OPTIONS to moc-predefs command
d3caf941 Autogen: Tests: Set AUTOMOC_MOC_OPTIONS in a simple test
96d20a4d Autogen: Don't use AUTOMOC_MOC_OPTIONS in moc-predefs command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: EoD <eod@xmw.de>
Merge-request: !1432
2017-11-01 08:05:47 -04:00
Brad King
cdc9c110a5 Merge topic '16780-write-single-xcodeproj'
e4e9ce7c Xcode: Add option to generate only topmost project file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1395
2017-11-01 08:02:15 -04:00
Gregor Jasny
e4e9ce7cbe Xcode: Add option to generate only topmost project file
Closes #16780
2017-10-31 17:09:26 +01:00
Sebastian Holtermann
d3caf941e4 Autogen: Tests: Set AUTOMOC_MOC_OPTIONS in a simple test 2017-10-31 14:55:49 +01:00
Brad King
6341596e29 Merge topic 'cmp0037-conditional-targets'
ae5f4069 CMP0037: Allow test and package targets when features are not enabled
409527a0 CMP0037: De-duplicate check and message generation
a2611d81 Tests: Add RunCMake.CMP0037 case for WARN on reserved targets
103501c4 Tests: Do not enable languages in all cases of RunCMake.CMP0037
2d0b3e6e cmGlobalGenerator: Refactor test and package target conditions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !1417
2017-10-31 08:19:27 -04:00
Justin Berger
08dca58358 Tests: reworked server tests to allow other operation modes 2017-10-30 10:58:58 -06:00
Brad King
ae5f40696e CMP0037: Allow test and package targets when features are not enabled
When CMake will not generate a test, package, or package_source target,
allow projects to create their own targets with these names.

Fixes: #16062
2017-10-30 10:21:31 -04:00
Brad King
58e0692b62 Merge topic 'cpack-deb-0-so-version-support'
5784ab8f CPack/Deb: handle shlibs file generation when SOVERSION set to 0

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1423
2017-10-30 08:55:36 -04:00
Brad King
e48397ee29 Merge topic 'cpack-rpm-dist-test-fix'
9ce00cae CPack/RPM: DIST-MONOLITHIC-type subtest fix

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1424
2017-10-30 08:52:48 -04:00
Brad King
da00080ed4 Merge branch 'cpack-rpm-dist-test-fix' into release-3.10
Merge-request: !1424
2017-10-30 08:50:21 -04:00
Domen Vrankar
9ce00caee3 CPack/RPM: DIST-MONOLITHIC-type subtest fix
Test was failing in case dist macro contained
a + symbol which is valid but must be escaped
for using the string as a regex.

Fixes #17328
2017-10-30 08:48:46 -04:00
Brad King
a7b770686a Merge topic 'fix-co-compile'
197b4e18 Merge branch 'backport-fix-co-compile' into fix-co-compile
992962c7 cmcmd: Restore support for running multiple lint tools
a5197eea cmcmd: Convert lint handlers to file-static functions
1c075ffd cmcmd: Rename loop iteration variable for clarity

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1418
2017-10-30 08:46:59 -04:00
Brad King
9bec6afa7a Merge topic 'autogen-static-library-cycles'
3a4db861 Autogen: Tests: Add test for STATIC_LIBRARY cycles
798e4f2f Autogen: Don't add STATIC_LIBRARY cycle targets to the _autogen dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1408
2017-10-30 08:45:49 -04:00
Domen Vrankar
5784ab8fca CPack/Deb: handle shlibs file generation when SOVERSION set to 0
Setting CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS did not
auto generate shlibs control file when .so version
of the library was set to 0.

Fixes #17318
2017-10-29 00:20:54 +02:00
Brad King
8ffc1c3d89 Merge topic 'generalize-importedtargets-behavior'
fb88d2b5 Help: Add notes for topic 'generalize-importedtargets-behavior'
494906a8 Add support for IMPORTED GLOBAL targets to be aliased
fe4b25ec Teach target_* commands to set INTERFACE properties of IMPORTED targets
e40fd9fd cmTargetPropCommandBase: Fix typo in error message

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Henry Schreiner <henryschreineriii@gmail.com>
Merge-request: !1264
2017-10-27 09:47:31 -04:00
Brad King
b779b8e85f Merge topic 'cmp0040-wording'
a1b1f1a2 CMP0040: Clarify policy warning to match documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1415
2017-10-27 09:42:37 -04:00
Brad King
0504fc8d84 Merge branch 'backport-fix-co-compile' into release-3.10
Merge-request: !1418
2017-10-27 09:41:25 -04:00
Brad King
dc4d2021e1 Merge branch 'autogen-static-library-cycles' into release-3.10
Merge-request: !1408
2017-10-27 09:41:11 -04:00
Sebastian Holtermann
3a4db8617e Autogen: Tests: Add test for STATIC_LIBRARY cycles 2017-10-27 09:37:15 -04:00
Brad King
197b4e18d4 Merge branch 'backport-fix-co-compile' into fix-co-compile
Resolve a logical conflict by replacing `cmArray{Begin,End}` from
the their side with `cm::{cbegin,cend}` from our side.
2017-10-27 09:31:04 -04:00
Brad King
992962c76d cmcmd: Restore support for running multiple lint tools
Refactoring in commit v3.10.0-rc1~115^2 (Clean up iwyu code to not be
one big if statement, 2017-08-28) incorrectly changed the logic to run
only one lint tool at a time.  Restore support for running all tools
specified on the command-line.
2017-10-27 09:26:50 -04:00
Brad King
a2611d816b Tests: Add RunCMake.CMP0037 case for WARN on reserved targets 2017-10-26 14:11:19 -04:00
Brad King
103501c4e0 Tests: Do not enable languages in all cases of RunCMake.CMP0037 2017-10-26 14:11:19 -04:00
Brad King
f01576012f Merge branch 'cmp0040-wording' into release-3.10
Merge-request: !1415
2017-10-26 09:48:28 -04:00
Brad King
a1b1f1a282 CMP0040: Clarify policy warning to match documentation
In commit v3.5.0-rc1~8^2~2 (Help: Clarify policy `CMP0040`
documentation, 2016-01-28) the documentation was clarified to indicate
that the target must be defined in the current directory.  Do the same
for the text of the policy warning itself.

Fixes: #17399
2017-10-26 09:47:29 -04:00
Deniz Bahadir
494906a8a2 Add support for IMPORTED GLOBAL targets to be aliased
Issue: #15569
Issue: #17197
2017-10-26 09:11:04 -04:00
Deniz Bahadir
fe4b25ec2f Teach target_* commands to set INTERFACE properties of IMPORTED targets
Now, several `INTERFACE_*` properties can be set on `IMPORTED` targets,
not only via `set_property` and `set_target_properties` but also via
`target_compile_definitions`, `target_compile_features`,
`target_compile_options`, `target_include_directories`, `target_sources`
and `target_link_libraries`.

Fixes: #15689
Issue: #17197
2017-10-26 09:11:04 -04:00
Deniz Bahadir
e40fd9fd19 cmTargetPropCommandBase: Fix typo in error message 2017-10-26 09:11:00 -04:00
Brad King
b5dd256d94 Merge topic 'defer-target-source-check'
4e7f6738 Defer check for sources within a target until generation.
6e4e7c65 Tests: Exclude bad RunCMake.add_executable case on multi-arch Xcode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1242
2017-10-25 08:11:19 -04:00
Deniz Bahadir
4e7f67383f Defer check for sources within a target until generation.
The `add_library` and `add_executable` commands can now be called with
no source-files and won't generate a warning or error message, as long
as source-files will be added later via the `target_sources` command.
If during the generation step still no sources are associated with
targets created by such calls a useful error message will be generated
and generation fails.

Targets of type `INTERFACE_LIBRARY`, `UTILITY` or `GLOBAL_TARGET` are
excluded from this check because we do not need sources for these target
types during generation.

Fixes: #16872
2017-10-24 08:14:47 -04:00
Brad King
6e4e7c6547 Tests: Exclude bad RunCMake.add_executable case on multi-arch Xcode
The `NoSourcesButLinkObjects` case would not be expected to work under
Xcode with multiple architectures even if the target objects were listed
directly as sources.  Exclude it.  We already exclude similar cases in
`RunCMake.add_library`.
2017-10-24 08:11:29 -04:00
Brad King
9ffb35386f VS: Select and save a VS 2017 instance persistently
Visual Studio 2017 supports multiple instances installed on a single
machine.  We use the Visual Studio Installer tool to enumerate instances
and select one.  Once we select an instance for a given build tree, save
the result in `CMAKE_GENERATOR_INSTANCE` so we can re-configure the tree
with the same instance on future re-runs of CMake.

Fixes: #17268
2017-10-19 10:20:12 -04:00
Brad King
314613d1af Add infrastructure for generators to select a build tool instance
Add cache entry `CMAKE_GENERATOR_INSTANCE` to hold the instance location
persistently across re-runs of CMake in a given build tree.

For now we reject the option by default if explicitly set.  It will be
implemented on a per-generator basis.  Pass the setting into try_compile
project generation.  Add a RunCMake.GeneratorInstance test to cover
basic use cases for the option.  Verify that `CMAKE_GENERATOR_INSTANCE`
is empty by default, and that it is rejected when the generator does not
support a user setting.

Issue: #17268
2017-10-19 10:20:08 -04:00
Brad King
358ceee5d8 Merge topic 'curl_netrc_options'
d45aa38a Add dev notes for topic 'curl_netrc_options'
60c272b6 ExternalProject: Add support for NETRC and NETRC_FILE suboption
754e39dd Add testcases for file(DOWNLOAD|UPLOAD) netrc options
5d67e902 file(DOWNLOAD|UPLOAD): Add 'NETRC' and 'NETRC_FILE' suboption

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
Merge-request: !1376
2017-10-19 09:27:43 -04:00
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