summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* Tests: Improve order of RunCMake.find_package casesBrad King2022-02-101-3/+2
| | | | Sort recently added cases among similar-named cases.
* Merge topic 'doc-if-AND-OR' into release-3.23Brad King2022-02-103-0/+9
|\ | | | | | | | | | | | | 41adfc6b04 Help: Clarify precedence of AND and OR in 'if' conditions Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6970
| * Help: Clarify precedence of AND and OR in 'if' conditionsBrad King2022-02-093-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | The wording update in commit b74819e4fe (Help: Format 'if' command documentation, 2013-12-18, v3.0.0-rc1~227^2~1) incorrectly implied that `AND` has higher precedence than `OR`. Although this is common in many languages, it has never been true in CMake's implementation. Revise the wording to clarify the precedence. Add a test case demonstrating the order. Fixes: #23207
* | Merge topic 'clang-cross-compile-windows-pdb' into release-3.23Brad King2022-02-101-1/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | 641cb1093b Windows/Clang: Support PDB when cross-compiling Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Alex <leha-bot@yandex.ru> Merge-request: !6959
| * | Windows/Clang: Support PDB when cross-compilingDeniz Bahadir2022-02-081-1/+2
| |/
* | Merge topic 'restore-target-export-includes' into release-3.23Brad King2022-02-105-0/+47
|\ \ | |/ |/| | | | | | | | | | | 83d79636bf install(TARGETS): Restore per-export INCLUDES DESTINATION Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !6969
| * install(TARGETS): Restore per-export INCLUDES DESTINATIONEugene Shalygin2022-02-095-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 55e4753bbb (Refactor cmTargetExport removing InterfaceIncludeDirecories, 2021-07-20, v3.22.0-rc1~337^2~1) the storage of `INCLUDES DESTINATION` was moved into each target. However, a target may be installed in multiple exports, and their `INCLUDES DESTINATION` should not be mixed. Convert the IncludeDirectoriesEntries vector to a map and modify access function to store the directories lists with respect to cmExportTarget object. This fixes error when the same target is exported more than once via different exports and each for consequent export its include directories list grows. Add a test for this case. Fixes: #23183
* | Merge topic 'GoogleTest-discover-type-params' into release-3.23Brad King2022-02-085-33/+47
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | GoogleTest: Change format for typed testsEvgeniy Shcherbina2022-02-074-42/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | GoogleTest: Fix type param tests for suites with many casesEvgeniy Shcherbina2022-02-075-9/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge topic 'ep-patch-USES_TERMINAL' into release-3.23Brad King2022-02-042-9/+13
|\ \ \ | |/ / |/| | | | | | | | | | | | | | cbb87e0a2c ExternalProject: Add support for USES_TERMINAL_PATCH keyword Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6940
| * | ExternalProject: Add support for USES_TERMINAL_PATCH keywordCraig Scott2022-02-032-9/+13
| | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge topic 'GoogleTest-discover-spaces-in-parameters' into release-3.23Brad King2022-02-043-0/+9
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | fd6b8fa40e GoogleTest: Preserve spaces in test parameters Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6941
| * | | GoogleTest: Preserve spaces in test parametersEvgeniy Shcherbina2022-02-033-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge topic 'test-mfc-explicit' into release-3.23Brad King2022-02-041-103/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9d621ceba1 Tests: Run MFC test only when explicitly enabled Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6943
| * | | | Tests: Run MFC test only when explicitly enabledBrad King2022-02-031-103/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge topic 'ci-minor-cleanups' into release-3.23Brad King2022-02-033-1/+7
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | Tests: Skip Clang PCH_INSTANTIATE_TEMPLATES test in MSVC ABIBrad King2022-02-022-1/+3
| | | |
| * | | Tests: Suppress MSVC CRT deprecation warnings in pseudo_llvm-rcBrad King2022-02-021-0/+4
| |/ /
* | | Merge topic 'cmake-ignore-prefix-path'Brad King2022-02-036-0/+60
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | find_*(): Add CMAKE_IGNORE_PREFIX_PATH variableKyle Edwards2022-02-026-0/+60
| |/ / | | | | | | | | | Fixes: #20878
* | | CMakePresets.json: Ensure configurePreset is reachable from current fileKyle Edwards2022-02-0210-0/+43
|/ /
* | Merge topic 'cuda_generic_arch_all'Brad King2022-02-021-34/+46
|\ \ | | | | | | | | | | | | | | | | | | | | | 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
| * | CUDA: Generic all and all-major supportRaul Tambre2022-02-011-34/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge topic 'dotnet_ref_in_sdk'Brad King2022-02-021-1/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 5ee3154f65 VS: .Net SDK Style projects can add Reference to dlls Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6932
| * | | VS: .Net SDK Style projects can add Reference to dllsSumit Bhardwaj2022-02-011-1/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge topic 'ep-redownload-on-SOURCE_DIR-change'Brad King2022-02-024-5/+45
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | d3477eba06 ExternalProject: Rerun download on SOURCE_DIR change Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6926
| * | | ExternalProject: Rerun download on SOURCE_DIR changeCraig Scott2022-02-014-5/+45
| | | | | | | | | | | | Fixes: #21748
* | | | Tests: Update FindBoost.TestPython for Python 3.10Brad King2022-02-011-2/+2
| | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge topic 'refactor-find-package-cmake-ignore-path'Brad King2022-02-012-0/+13
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | find_package(): Add tests for CMAKE_IGNORE_PATHKyle Edwards2022-01-312-0/+13
| |/ /
* | | Merge topic 'link-interface-direct'Brad King2022-01-3163-3/+773
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Add usage requirements to update direct link dependenciesBrad King2022-01-2963-2/+773
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Tests: Remove unnecessary policy setting from ObjectLibrary testBrad King2022-01-291-1/+0
| | | | | | | | | | | | | | | | | | Since commit 72e7c45e98 (Tests: Bump CMake minimum required in tests to 2.8.12, 2020-12-22, v3.20.0-rc1~224^2), policy CMP0022 is set to NEW for the entire test. Remove a leftover explicit setting.
* | | Merge topic 'ibmclang-compiler'Brad King2022-01-285-10/+10
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8c1731546c Help: Add release note for IBM Open XL C/C++ compiler support 24da80b70a Utilities: Suppress warnings in third-party code with IBMClang 6da99e671c IBMClang: Add support for IBM Open XL C/C++ Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6785
| * | | IBMClang: Add support for IBM Open XL C/C++Aaron Liu2022-01-275-10/+10
| | | | | | | | | | | | | | | | Fixes: #22929
* | | | Merge topic 'cuda_vs_arch_all'Brad King2022-01-289-0/+27
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | daf372c4d6 CUDA: Fix issuing error if default architecture detection fails 7a0d098352 CUDA: Error on empty/invalid CMAKE_CUDA_ARCHITECTURES set by user d19273bc7b CUDA: Support all and all-major on Visual Studio 5f667d783a CUDA: Actually use reverse architecture deprecation order for Clang Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Brad King <brad.king@kitware.com> Merge-request: !6912
| * | | | CUDA: Error on empty/invalid CMAKE_CUDA_ARCHITECTURES set by userRaul Tambre2022-01-279-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If empty we otherwise treat it the same as unset in most places, but still end up failing eventually with a confusing "Failed to find a working CUDA architecture". This also detects some other basic invalid ones (e.g. "al").
* | | | | string(TIMESTAMP): add %f specifier for microsecondsPeter Würth2022-01-282-2/+2
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The %f specified extends the string(TIMESTAMP) and file(TIMESTAMP) commands to output the timestamp with a microsecond resolution. This convention is offered by python's datetime module. Before, the precision was limited to seconds. The implementation is done by extending existing cmTimestamp methods with a `microseconds` parameter. This parameter is optional in order to be backwards compatible. The timestamps are now received in a cross-platform manner using libuv, since the standard C functions like time() don't allow for sub-second precision. This requires libuv 1.28 or higher. We already require higher than that on Windows, so update the required version for other platforms. Implements: #19335
* | | | Merge topic 'ep_test_with_build_with_server-arg-fix'Brad King2022-01-251-1/+1
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | 9406b2073e Tests: Remove stray argument from test invocation Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6893
| * | | Tests: Remove stray argument from test invocationCraig Scott2022-01-241-1/+1
| |/ / | | | | | | | | | | | | | | | | | | The run_cmake_with_options() command already sets the test command to ${CMAKE_COMMAND}. The options passed to that command shouldn't also add another ${CMAKE_COMMAND}. This removes a warning seen in the output of tests that invoke __ep_test_with_build_with_server().
* | | Merge topic 'cmp0128_cuda'Brad King2022-01-2414-31/+46
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | ee1396e29e CMP0128: Add flag in OLD mode even when standard matches the default b2c25de8e0 CMP0128: Avoid test code duplication 3a089cd256 CMP0128: Prefix test names with mode e13dd52535 XL: Detect default extensions mode for legacy compiler Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6890
| * | CMP0128: Add flag in OLD mode even when standard matches the defaultRaul Tambre2022-01-233-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 4a0485be (cmStandardLevelResolver: Avoid unnecessary flags, fix unset level logic, 2021-04-29) unintentionally changed the behavior by modifying the code to match a pre-existing comment. The resulting behavior change however matches the intentions of CMP0128, so we simply need to guard it. Fixes #23122.
| * | CMP0128: Avoid test code duplicationRaul Tambre2022-01-237-26/+10
| | |
| * | CMP0128: Prefix test names with modeRaul Tambre2022-01-237-7/+7
| | | | | | | | | | | | Makes clear that these tests are for the NEW behaviour.
| * | Merge topic 'vs2022-v143-link-guard-cf' into release-3.22Brad King2022-01-133-0/+48
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | 9e24437c91 VS: Remove the '/guard:cf' flag from v143 link flag table Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6858
* | \ \ Merge topic 'vs-package-restore'Brad King2022-01-2420-2/+103
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9aa7831f05 Presets: add resolve packages setting to build presets. b2f8f0bb87 cmGlobalVisualStudio10Generator: Auto restore NuGet packages. 193b8fca52 cmBuildOptions: Split build arguments into separate object. 6a10103493 Help: Update preset schema description for version 3 entries. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6761
| * | | Presets: add resolve packages setting to build presets.Carsten Rudolph2022-01-222-2/+8
| | | |
| * | | cmGlobalVisualStudio10Generator: Auto restore NuGet packages.Carsten Rudolph2022-01-2218-0/+95
| | | |
* | | | Merge topic 'cmake-warn-extra-paths'Brad King2022-01-214-2/+17
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | eacf1f879b cmake: Warn about unnecessary paths on command line a4f076110d Tests: Fix RunCMake.CommandLine toolchain case command line Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6882