Commit Graph

9104 Commits

Author SHA1 Message Date
Brad King
25003baf50 Merge topic 'vs_buildcache_support'
b764c7c273 VS: Add property to turn off Visual Studio compile batching

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6957
2022-02-09 08:59:45 -05:00
Brad King
419eb2349a Merge topic 'test-vcs'
7b23fd6c1b Tests: Run CTest.UpdateBZR tests only if explicitly enabled
7cf5355d5e Tests: Add cache entries to control ExternalProject test VCS tools
c8b29dc5b9 Tests: Add cache entries to control existence of CTest.Update* tests
a70864e300 Tests: Make condition for CTest.UpdateCVS match pattern of other tools
1972a75536 Tests: Drop CTestUpdate.BZR test check for xmloutput plugin
f2566f6416 Tests: Drop unnecessary check for FindCVS module
530242576c Tests: Remove always-true condition enabling CTest.Update* tests
4e88a4228e Tests: Remove unused CVS tool discovery

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6956
2022-02-09 08:54:38 -05:00
Brad King
8fa592a5f2 Merge topic 'GoogleTest-discover-type-params'
073dd1bd81 GoogleTest: Change format for typed tests
f28f738bd2 GoogleTest: Fix type param tests for suites with many cases

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6958
2022-02-08 08:35:19 -05:00
Brad King
7b23fd6c1b Tests: Run CTest.UpdateBZR tests only if explicitly enabled
These tests have not been automatically enabled on current
versions of `bzr` in a long time.  The recent change to
drop the `xmlplugins` heuristic caused the tests to start
running on some machines, but they do not work everywhere.
Disable the tests again pending further investigation.
2022-02-08 08:17:39 -05:00
Kaloyan Donev
b764c7c273 VS: Add property to turn off Visual Studio compile batching
Resolves: #23179
2022-02-08 08:07:00 +02:00
Evgeniy Shcherbina
073dd1bd81 GoogleTest: Change format for typed tests
Before it would output a typed test as follows:
  Suit/Type.Case
And now it would be:
  Suit.Case<Type>

In case of NO_PRETTY_TYPES it would simply use the type number
instead of its text representation:
  Suit.Case<0>

The change is introduced to make sure CTest outputs tests in a
similar fashion which is "*Suit.Case*" and angle brackets "<>"
emphasize that we are dealing with a typed (template) kind.
2022-02-07 12:53:17 -05:00
Evgeniy Shcherbina
f28f738bd2 GoogleTest: Fix type param tests for suites with many cases
When there were many cases (two digits or more) the "prettier" would
fail to recognize the pretty part leaving the test name unprocessed.
The fix made sure the processing would work correctly, irrespective
of the case number.

Before the fix, for the following input:
TypedSuite/1.  # TypeParam = int
  case
TypedSuite/10.  # TypeParam = char
  case
The output would be:
TypedSuite/int.case
TypedSuite/10.  # TypeParam = char.case

Now the output will be:
TypedSuite/int.case
TypedSuite/char.case
2022-02-07 12:53:16 -05:00
Brad King
6b6d0d12a7 Merge topic 'allow_manifest_as_content'
feebc8394f Windows: Allow manifest files to be bundled as content

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6939
2022-02-07 12:19:01 -05:00
Brad King
4cf80f413b Merge topic 'cmcmd-end-of-options-delimiter'
b10930040d cmcmd: add end of options delimiter to cmake -E commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6934
2022-02-07 12:18:03 -05:00
Brad King
7cf5355d5e Tests: Add cache entries to control ExternalProject test VCS tools
Add undocumented `CMake_TEST_ExternalProject_*` cache entries to
explicitly enable or disable these tests.  If not set, compute defaults
as before.  Also consolidate the VCS default heuristics.
2022-02-07 11:53:29 -05:00
Brad King
c8b29dc5b9 Tests: Add cache entries to control existence of CTest.Update* tests
Add undocumented `CMake_TEST_CTestUpdate_*` cache entries to explicitly
enable or disable these tests.  If not set, compute defaults as before.
2022-02-07 11:53:29 -05:00
Brad King
a70864e300 Tests: Make condition for CTest.UpdateCVS match pattern of other tools 2022-02-07 11:53:28 -05:00
Brad King
1972a75536 Tests: Drop CTestUpdate.BZR test check for xmloutput plugin
Current `bzr` tools do not have any `bzr xmlplugins` command.
2022-02-07 11:53:28 -05:00
Brad King
f2566f6416 Tests: Drop unnecessary check for FindCVS module 2022-02-07 11:53:28 -05:00
Brad King
530242576c Tests: Remove always-true condition enabling CTest.Update* tests 2022-02-07 11:53:26 -05:00
Brad King
4e88a4228e Tests: Remove unused CVS tool discovery
Since commit b819ee85c0 (BUG: Oops. Left chunk of junk at the bottom of
the main Tests CMakeLists.txt file..., 2009-07-24, v2.8.0~385) the
`do_cvs_tests` variable is not used in `Tests/CMakeLists.txt`.
2022-02-07 11:51:40 -05:00
Brad King
c308000ca1 Merge topic 'test-ctest_build-subdir-target'
e485dca1e8 Tests: Move CTest.BuildCommand.ProjectInSubdir into RunCMake.ctest_build

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6953
2022-02-07 11:48:26 -05:00
Brad King
e2e9a4b4c9 Merge topic 'test-download-server-timeout'
8809183d58 Tests: Optionally extend RunCMake.ExternalProject download server timeout

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6952
2022-02-07 11:46:55 -05:00
Brad King
e485dca1e8 Tests: Move CTest.BuildCommand.ProjectInSubdir into RunCMake.ctest_build
The former duplicates code that is now part of the infrastructure in the
latter.  The latter can also explicitly verify the results.
2022-02-04 08:34:27 -05:00
Brad King
f84dcbd496 Merge topic 'post-rel-dev'
9a48012f93 Configure CMake itself with policies through CMake 3.22
a5a9687799 export: Increase maximum policy version in exported files to 3.22
a9ffded98c Add deprecation warnings for policies CMP0097 and below

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6948
2022-02-04 08:24:26 -05:00
Brad King
cf68f52875 Merge topic 'ep-patch-USES_TERMINAL'
cbb87e0a2c ExternalProject: Add support for USES_TERMINAL_PATCH keyword

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6940
2022-02-04 08:18:13 -05:00
Brad King
56aac8cf50 Merge topic 'GoogleTest-discover-spaces-in-parameters'
fd6b8fa40e GoogleTest: Preserve spaces in test parameters

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6941
2022-02-04 08:13:07 -05:00
Brad King
c8a955584d Merge topic 'GoogleTest-discover-spaces-in-parameters' into release-3.23
fd6b8fa40e GoogleTest: Preserve spaces in test parameters

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6941
2022-02-04 08:13:06 -05:00
Brad King
deb27767e0 Merge topic 'test-mfc-explicit'
9d621ceba1 Tests: Run MFC test only when explicitly enabled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6943
2022-02-04 08:08:24 -05:00
Brad King
3900a31f44 Merge topic 'test-mfc-explicit' into release-3.23
9d621ceba1 Tests: Run MFC test only when explicitly enabled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6943
2022-02-04 08:08:23 -05:00
Brad King
8809183d58 Tests: Optionally extend RunCMake.ExternalProject download server timeout
Some of the `RunCMake.ExternalProject` test cases use a download server
implemented in Python.  Normally we wait up to 30 seconds for it to
start.  However, on some machines running many tests concurrently, the
download server may take longer than that to start.  Add an undocumented
cache entry to use on those machines to extend the timeout.
2022-02-04 07:15:40 -05:00
Aron Yu
feebc8394f Windows: Allow manifest files to be bundled as content 2022-02-04 10:16:55 +01:00
Peter Würth
b10930040d cmcmd: add end of options delimiter to cmake -E commands
Implements a -- delimiter, that indicates the end of options (starting
with a dash -) of a command and separates them from the subsequent
operands (positional arguments).

The following commands are affected:
- env: Implemented the -- delimiter.
- cat: The -- delimiter was already kind of considered, but its
  occurence did not stop the options parsing.
- rm: Here the command already implemented the -- delimiter as
  specified, but it was not documented.

Fixes #22970
2022-02-03 21:54:17 +01:00
Brad King
a9ffded98c Add deprecation warnings for policies CMP0097 and below
The OLD behaviors of all policies are deprecated, but only by
documentation.  Add an explicit deprecation diagnostic for policies
introduced in CMake 3.16 and below to encourage projects to port
away from setting policies to OLD.
2022-02-03 14:13:12 -05:00
Brad King
43acc8e3c7 Merge topic 'ci-minor-cleanups'
040c509bce gitlab-ci: clarify name of windows fragment for building with ninja
bd14f07ce9 Tests: Skip Clang PCH_INSTANTIATE_TEMPLATES test in MSVC ABI
c26b064b8c Tests: Suppress MSVC CRT deprecation warnings in pseudo_llvm-rc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6947
2022-02-03 09:57:46 -05:00
Brad King
8d4e353ede Merge topic 'ci-minor-cleanups' into release-3.23
040c509bce gitlab-ci: clarify name of windows fragment for building with ninja
bd14f07ce9 Tests: Skip Clang PCH_INSTANTIATE_TEMPLATES test in MSVC ABI
c26b064b8c Tests: Suppress MSVC CRT deprecation warnings in pseudo_llvm-rc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6947
2022-02-03 09:57:45 -05:00
Craig Scott
cbb87e0a2c ExternalProject: Add support for USES_TERMINAL_PATCH keyword
This brings the patch step into line with all the others which already
had their own `USES_TERMINAL_<step>` keyword. All steps (including
patch) already have their own `LOG_<step>` keyword too, so the lack of
`USES_TERMINAL_PATCH` was inconsistent.
2022-02-03 09:27:35 -05:00
Brad King
7077916781 Merge topic 'cmake-ignore-prefix-path'
201d8c4298 find_*(): Add CMAKE_IGNORE_PREFIX_PATH variable
bd805a51ae Refactor: Keep track of prefixes in cmSearchPath

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6880
2022-02-03 07:35:23 -05:00
Brad King
9d621ceba1 Tests: Run MFC test only when explicitly enabled
Previously we used a complicated heuristic to decide whether or not to
run the MFC test, but it sometimes decided incorrectly to run the test.
Since that was first written, we have developed a convention for other
tests to enable them via undocumented cache entries that are added only
on machines known to meet the tests' requirements.  Do that for MFC.
2022-02-03 06:45:53 -05:00
Evgeniy Shcherbina
fd6b8fa40e GoogleTest: Preserve spaces in test parameters
Before the fix the gtest_discover_tests() function would strip the
user data in test parameters (everything to the right of GetParam())
of spaces. Now the parameters aren't altered in any way.

Fixes #23058
2022-02-03 14:12:53 +03:00
Kyle Edwards
c18409cdac CMakePresets.json: Ensure configurePreset is reachable from current file 2022-02-02 15:17:30 -05:00
Brad King
bd14f07ce9 Tests: Skip Clang PCH_INSTANTIATE_TEMPLATES test in MSVC ABI 2022-02-02 15:02:51 -05:00
Brad King
c26b064b8c Tests: Suppress MSVC CRT deprecation warnings in pseudo_llvm-rc 2022-02-02 14:46:25 -05:00
Kyle Edwards
201d8c4298 find_*(): Add CMAKE_IGNORE_PREFIX_PATH variable
Fixes: #20878
2022-02-02 11:09:00 -05:00
Brad King
9245925810 Merge topic 'cuda_generic_arch_all'
8f64df0a7c CUDA: Generic all and all-major support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !6816
2022-02-02 08:23:19 -05:00
Brad King
0f316675cf Merge topic 'dotnet_ref_in_sdk'
5ee3154f65 VS: .Net SDK Style projects can add Reference to dlls

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6932
2022-02-02 08:21:16 -05:00
Brad King
1e1e04db75 Merge topic 'ep-redownload-on-SOURCE_DIR-change'
d3477eba06 ExternalProject: Rerun download on SOURCE_DIR change

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6926
2022-02-02 08:17:51 -05:00
Brad King
efe3af0119 Tests: Update FindBoost.TestPython for Python 3.10
Follow up commit d4bb6c0c7f (FindBoost: Add support for Python 3.10,
2021-12-16, v3.22.2~14^2) with an update for the FindBoost test.
2022-02-01 17:20:28 -05:00
Brad King
c138ddb943 Merge topic 'refactor-find-package-cmake-ignore-path'
11f97d1968 find_package(): Refactor CMAKE_[SYSTEM_]IGNORE_PATH
30e5c1d92b find_package(): Add tests for CMAKE_IGNORE_PATH

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6918
2022-02-01 12:04:33 -05:00
Raul Tambre
8f64df0a7c CUDA: Generic all and all-major support
Commit 14d8a276 (CUDA: Support nvcc 11.5 new -arch=all|all-major flags,
2021-08-17) added all and all-major options to CUDA_ARCHITECTURES. These are
fairly generic and likely to see real-world use by distributors. Thus it's
desirable to support these also for Clang and older NVCC versions.

The supported architectures are dependent on the toolkit version. We determine
the toolkit version prior to compiler detection. For NVCC we get the version
from the vendor identification output, but for Clang we need to invoke NVCC
separately.

The architecture information is mostly based on the Wikipedia list with the
earliest supported version being CUDA 7.0. This could be documented and
expanded in the future to allow projects to query CUDA toolkit version and
architecture information.
For Clang we additionally constrain based on its support.

Additionally the architecture mismatch detection logic is fixed, improved and
updated for generic support:
* Commit 01428c55 (CUDA: Fail fast if CMAKE_CUDA_ARCHITECTURES doesn't work
  during detection, 2020-08-29) enabled CMAKE_CUDA_COMPILER_ID_REQUIRE_SUCCESS
  if CMAKE_CUDA_ARCHITECTURES is specified. This results in
  CMakeDetermineCompilerID.cmake printing the compiler error and our code for
  presenting the mismatch in a user-friendly way being useless. The custom
  logic seems preferable so go back to not enabling it.
* Commit 14d8a276 (CUDA: Support nvcc 11.5 new -arch=all|all-major flags,
  2021-08-17) tried to support CMP0054 but forgot to add x to the interpolated
  result. Thus the conditions would always evaluate to false. This is fixed as
  a byproduct of removing NVIDIA specific checks, improving the error message
  and replacing architectures_mode with a simpler architectures_explicit.

Visual Studio support omits testing the flags during detection due to
complexities in determining the toolkit version when using it.
A long-term proper implementation would be #23161.

Implements #22860.
2022-02-01 18:25:20 +02:00
Sumit Bhardwaj
5ee3154f65 VS: .Net SDK Style projects can add Reference to dlls
When support for `DOTNET_SDK` was added, only a minimal set of options
were built in. Based on user feedback, support for reference to dlls
(not just projects) is needed. That support is added here.

Fixes: #23166
2022-02-01 07:18:03 -08:00
Craig Scott
d3477eba06 ExternalProject: Rerun download on SOURCE_DIR change
Fixes: #21748
2022-02-01 22:31:29 +11:00
Brad King
5305d5aa1a Merge topic 'link-interface-direct'
f3ad061858 Add usage requirements to update direct link dependencies
193a999cd5 cmTarget: Add INTERFACE_LINK_LIBRARIES_DIRECT{,_EXCLUDE} backtrace storage
22d5427aa6 cmGeneratorTarget: Add LookupLinkItem option to consider own target name
f3d2eab36a cmGeneratorTarget: Fix link interface caching of partial results
d75ab9d066 cmGeneratorTarget: Clarify CMP0022 logic in ComputeLinkInterfaceLibraries
f3e9e03fe0 cmGeneratorTarget: Simplify CMP0022 warning check
216aa14997 cmGeneratorTarget: Return early from ExpandLinkItems with no items
1bc98371d1 Tests: Remove unnecessary policy setting from ObjectLibrary test
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6886
2022-01-31 10:36:55 -05:00
Kyle Edwards
30e5c1d92b find_package(): Add tests for CMAKE_IGNORE_PATH 2022-01-31 10:33:54 -05:00
Brad King
f3ad061858 Add usage requirements to update direct link dependencies
Link line construction starts with `LINK_LIBRARIES` and appends
dependencies from the transitive closure of `INTERFACE_LINK_LIBRARIES`.
Only the entries of `LINK_LIBRARIES` are considered direct link
dependencies.  In some advanced use cases, particularly involving static
libraries and static plugins, usage requirements need to update the list
of direct link dependencies.  This may mean adding new items, removing
existing items, or both.

Add target properties to encode these usage requirements:

* INTERFACE_LINK_LIBRARIES_DIRECT
* INTERFACE_LINK_LIBRARIES_DIRECT_EXCLUDE

Fixes: #22496
2022-01-29 06:48:13 -05:00