summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'cmake-presets-file-dir' into release-3.23Brad King2022-03-087-1/+49
|\ | | | | | | | | | | | | | | | | f54507c2f6 CMakePresets.json: Add ${fileDir} macro Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Acked-by: Gerhard Olsson <gerhard.nospam@gmail.com> Merge-request: !7051
| * CMakePresets.json: Add ${fileDir} macroKyle Edwards2022-03-077-1/+49
| | | | | | | | Fixes: #23214
* | Tests: Make RunCMake.CMP0125 robust to external filesystem contentBrad King2022-03-074-56/+56
|/ | | | | | | | Revise the test from commit 08db1341a6 (find_*: ensure consistent behavior for cache variables, 2021-05-03, v3.21.0-rc1~177^2) to avoid searching outside the test directories. Fixes: #23299
* Merge topic 'file-set-name-requirements' into release-3.23Brad King2022-03-044-0/+12
|\ | | | | | | | | | | | | | | b357d334fc target_sources(): Enforce stricter requirements for FILE_SET name Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7037
| * target_sources(): Enforce stricter requirements for FILE_SET nameKyle Edwards2022-03-034-0/+12
| | | | | | | | Fixes: #23286
* | Merge topic 'file-set-multiple-names' into release-3.23Brad King2022-03-041-5/+9
|\ \ | | | | | | | | | | | | | | | | | | 8c23ecbd93 target_sources(): Process multiple FILE_SET arguments per block Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7040
| * | target_sources(): Process multiple FILE_SET arguments per blockKyle Edwards2022-03-031-5/+9
| |/ | | | | | | Fixes: #23287
* | Merge topic 'while-bug-compatibility' into release-3.23Brad King2022-03-046-24/+12
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | da2361ffb3 while: Restore tolerance of condition error 47d197745a Tests: Simplify RunCMake.{if,while} unbalanced parenthesis cases Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7041
| * | while: Restore tolerance of condition errorAlex Turbov2022-03-034-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 880ca66b51 (Fix: `while()` can silently ignore incorrect condition, 2021-08-09, v3.22.0-rc1~238^2~4) we correctly reject the code set(paren "(") while(${paren}) endwhile() However, rejecting it breaks compatibility with projects that used such code accidentally. In CMake 3.21 and below, any error in the condition was ignored because the `false` result exited the loop first. Restore tolerance of the error for now. A policy will be needed to make it an error later. Note that the same condition with `if` was always correctly rejected. Fixes: #22524 Issue: #23296 Co-authored-by: Brad King <brad.king@kitware.com>
| * | Tests: Simplify RunCMake.{if,while} unbalanced parenthesis casesBrad King2022-03-034-16/+11
| | |
* | | Merge topic 'cuda-arch-all' into release-3.23Brad King2022-03-035-0/+18
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | dae3ad08fa Tests: Add cases for CMAKE_CUDA_ARCHITECTURES={all,all-major} 5c1f5357b0 VS: Fix CUDA compiler id with CMAKE_CUDA_ARCHITECTURES={all,all-major} Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7035
| * | | Tests: Add cases for CMAKE_CUDA_ARCHITECTURES={all,all-major}Brad King2022-03-025-0/+18
| | |/ | |/| | | | | | | | | | | | | | | | The `CudaOnly.All` test only sets these in project code after CUDA is enabled. Add another case to test the values during compiler detection. Issue: #23161
* | | Merge topic 'cmake-dir-args' into release-3.23Brad King2022-03-0349-30/+84
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | d2e9478321 Tests: Add RunCMake.CommandLine ExplicitiDirs explicit work directory 78e8f11456 cmake: Correct regression in `-B <dir> <src_dir>` 4091d5c58c Tests: Verify RunCMake.CommandLine ExplicitDirs source/build dirs 1b97f8f35c Tests: Clarify RunCMake.CommandLine ExplicitDirs case names Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7030
| * | Tests: Add RunCMake.CommandLine ExplicitiDirs explicit work directoryBrad King2022-03-021-0/+6
| | | | | | | | | | | | | | | | | | | | | Verify that the work directory is not selected as the source or build tree. Issue: #23285
| * | cmake: Correct regression in `-B <dir> <src_dir>`Robert Maynard2022-03-021-0/+1
| | | | | | | | | | | | Fixes: #23285
| * | Tests: Verify RunCMake.CommandLine ExplicitDirs source/build dirsBrad King2022-03-0223-0/+47
| | |
| * | Tests: Clarify RunCMake.CommandLine ExplicitDirs case namesBrad King2022-03-0227-30/+30
| | |
* | | Merge topic 'doc-presets-v4' into release-3.23Brad King2022-03-023-0/+11
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 6404751176 Help: Improve wording and structure related to preset includes Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7028
| * | | 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
* | | | target_sources(): Prohibit FILE_SET on custom targetsKyle Edwards2022-02-284-0/+8
|/ / / | | | | | | | | | Fixes: #23262
* | | 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