summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* Help: Improve wording and structure related to preset includesCraig Scott2022-03-023-0/+11
| | | | | | | | | | | Encourage placing preset includes near the beginning of a preset file and ensure the example shows that usage. Move the prose discussing includes to its own section to improve discoverability and break up paragraphs to make each main point harder to miss. Also clarify ${sourceDir} to remove any ambiguity with regard to its meaning in included files. Issue: #23214
* Ninja: Avoid preprocessing twice with explicit Fortran_PREPROCESSPeter Hill2022-02-242-1/+9
| | | | | | Fix spurious warnings from gfortran+Ninja for preprocessing. Fixes: #23248
* Merge topic 'correct_multiple_source_warnings' into release-3.23Brad King2022-02-187-0/+46
|\ | | | | | | | | | | | | | | 7083b19498 cmake: When given multiple source paths use last instead of first Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7001
| * cmake: When given multiple source paths use last instead of firstRobert Maynard2022-02-177-0/+46
| | | | | | | | | | | | | | | | When given two source paths via `-S` or just directory paths prefer the last one. When the paths are mixed always prefer the last `-S` entry. Fixes: #23238
* | Merge topic 'file-set-no-exist' into release-3.23Brad King2022-02-182-0/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | 058b8a0bfb install(): Properly ignore FILE_SETs that don't exist Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7000
| * | install(): Properly ignore FILE_SETs that don't existKyle Edwards2022-02-172-0/+5
| |/ | | | | | | Fixes: #22960
* | Merge topic 'test-qt-disable' into release-3.23Brad King2022-02-181-4/+8
|\ \ | |/ |/| | | | | | | | | 5bfff3c750 Tests: Add missing guards on Qt4 and Qt5 tests Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6998
| * Tests: Add missing guards on Qt4 and Qt5 testsBrad King2022-02-171-4/+8
| | | | | | | | | | | | | | | | Add missing `CMake_TEST_Qt{4,5}` conditions on Qt4 an Qt5 tests. Configuring CMake with `-DCMake_TEST_Qt5=OFF` should prevent any attempt to search for Qt5. Fixes: #23239
* | Merge topic 'cmake-empty-cmd-line-arg' into release-3.23Brad King2022-02-1714-4/+38
|\ \ | | | | | | | | | | | | | | | | | | | | | f73457ca2e cmake: Ignore any empty "" command line arguments 67f97f5478 Tests: Add RunCMake helper to run cmake with raw execute_process args Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6980
| * | cmake: Ignore any empty "" command line argumentsRobert Maynard2022-02-1613-2/+23
| | | | | | | | | | | | | | | | | | | | | Don't treat empty quote arguments("") as the current working directory but instead ignore them. Fixes #23217
| * | Tests: Add RunCMake helper to run cmake with raw execute_process argsBrad King2022-02-161-2/+15
| | |
* | | Merge topic 'test-cuda-sepcomp-ptx' into release-3.23Brad King2022-02-171-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | a7ef59c9c4 Tests: Fix CudaOnly.SeparateCompilationPTX test project name Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6991
| * | | Tests: Fix CudaOnly.SeparateCompilationPTX test project nameBrad King2022-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the test added by commit 61b9764b03 (CUDA: Allow both CUDA_SEPARABLE_COMPILATION and CUDA_PTX_COMPILATION, 2021-09-17, v3.23.0-rc1~516^2) to have a `project()` name matching what is passed to CTest's `--build-project` option. Otherwise, on VS builds, MSBuild warns: MSBUILD : error MSB1009: Project file does not exist. Other CUDA tests use a matching project name already.
* | | | target_link_libraries: Improve tolerance of unquoted generator expressionsBrad King2022-02-151-0/+10
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to commit 1d709ea2f5 (cmGeneratorTarget: Propagate backtraces from INTERFACE_LINK_LIBRARIES, 2021-12-15, v3.23.0-rc1~228^2), the value of `INTERFACE_LINK_LIBRARIES` was a single string. If an unquoted generator expression passed to `target_link_libraries` contained `;` and became multiple arguments, they would all accumulate as a single `;`-separated list in the value of `INTERFACE_LINK_LIBRARIES`. Since that commit, each argument to `target_link_libraries` is placed in `INTERFACE_LINK_LIBRARIES` as a separate entry, as has long been the case for `LINK_LIBRARIES`. That behavior change broke projects that were accidentally relying on accumulation in `INTERFACE_LINK_LIBRARIES` to produce complete generator expressions containing `;`. Teach `target_link_libraries` to accumulate consecutive non-keyword arguments into a single entry before placing them in `LINK_LIBRARIES` or `INTERFACE_LINK_LIBRARIES`. For example, treat `a b c` as if they were written as `"a;b;c"`. This restores the previously accidental support for unquoted generator expressions in `INTERFACE_LINK_LIBRARIES`, and also enables it for `LINK_LIBRARIES`. For now, do not drop the `target_link_libraries` documentation that recommends quoting generator expressions. Quoting is still important to populate `LINK_LIBRARIES` in CMake 3.22 and below, and is also good practice to keep generator expressions whole. Fixes: #23203
* | | Merge topic 'GoogleTest-discovery-fix-escaping' into release-3.23Brad King2022-02-147-0/+130
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 61929f936f GoogleTest: Fix escaping in test names Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6965
| * | | GoogleTest: Fix escaping in test namesEvgeniy Shcherbina2022-02-117-0/+130
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to add_command() being a macro it introduced excessive and nonobvious escaping in different parts of the script. Because of one of such places the resulting script would have an erroneous ${TEST_LIST} if the user data (in test parameters) had a semicolon. To eliminate this non-obvious escaping, add_command() was converted to function. Updated the escaping accordingly. Fixes: #23059
* | | find_package: Improve --debug-find-pkg= when using a find moduleBrad King2022-02-105-0/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | Extend the feature added by commit d7b18895bc (cmake: Add filtered debug-find options, 2021-12-07, v3.23.0-rc1~217^2) to enable debug output for `find_*` calls within a find module or cmake package configuration file. Fixes: #23211
* | | find_package: Avoid printing debug output header multiple timesBrad King2022-02-102-8/+0
| | |
* | | find_package: Mention package name in Config mode debug outputBrad King2022-02-103-3/+6
| | | | | | | | | | | | | | | Otherwise, if there are no paths considered then the output does not specify the name of the package.
* | | find_package: Fix find module name in --debug-find outputBrad King2022-02-102-2/+2
| | |
* | | find_package: Improve formatting of --debug-find outputBrad King2022-02-104-41/+176
| | | | | | | | | | | | Also spell out more complete content in the test's expect output.
* | | 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.