summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'LINK_GROUP-rescan-static-libs'Brad King2022-03-073-1/+18
|\ | | | | | | | | | | | | b0fada9964 Genex-LINK_GROUP: Add feature RESCAN Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7044
| * Genex-LINK_GROUP: Add feature RESCANMarc Chevrier2022-03-053-1/+18
| | | | | | | | | | Feature RESCAN can be used to manage circular references between static libraries.
* | while: diagnose errors during condition evaluationBrad King2022-03-0410-2/+34
|/ | | | | | Add a policy to diagnose condition errors in a compatible way. Fixes: #23296
* Merge topic 'file-set-name-requirements'Brad 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'Brad 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'Brad 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'Brad 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 '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
* | \ \ Merge topic 'cmake-dir-args'Brad 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'Brad 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
* | | | Merge topic 'file-set-no-custom-targets'Brad King2022-03-024-0/+8
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | ad41c9cd11 target_sources(): Prohibit FILE_SET on custom targets Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7027
| * | | target_sources(): Prohibit FILE_SET on custom targetsKyle Edwards2022-02-284-0/+8
| |/ / | | | | | | | | | Fixes: #23262
| * | 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
| * \ \ 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
| * \ \ \ 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
* | | | | Merge topic 'symlink-build-under-source'Brad King2022-03-011-12/+0
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d33b12d84b Add support for build tree symlink inside source tree 43416c48ed cmOutputConverter: Always set relative path top source and binary together de766bc7e0 Xcode: Fix support for source tree symlink inside build tree 55db2cf1e5 Makefiles: Fix "make depend" with add_custom_command DEPFILE Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7020
| * | | | | Add support for build tree symlink inside source treeBrad King2022-02-281-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit c564a3e3ff (Ninja: Always compile sources using absolute paths, 2021-05-19, v3.21.0-rc1~129^2), both the Ninja and Makefile generators pass source files and include directories to the compiler as absolute paths. However, in some other contexts within generated build systems, we generate paths that may be relative or absolute. In these contexts, we prefer relative paths, but avoid them when they contain a `../` sequence that leaves both the build tree and the source tree: * When the build tree is outside of the source tree, all paths to the source tree are absolute. * When the build tree is inside the source tree, we previously assumed that it is a real directory such that exiting the build tree with `../` enters the source tree. This allowed paths to the source tree to be relative to the build tree. In the latter case, we previously did not support using a symbolic link inside the source tree to point at the build tree. This is because relative paths to the source tree would be generated with `../` sequences leaving the build tree, but they would jump to the parent of the real build tree, which is not the source tree. Fix this by requiring that `../` sequences stay inside the build tree even if its path appears to be inside the source tree. When the build tree is inside the source tree, all paths to the source tree are now absolute. For consistency, this applies regardless of whether the path to the build tree contains a symbolic link. Fixes: #21819
| * | | | | Xcode: Fix support for source tree symlink inside build treeBrad King2022-02-281-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 61495cdaae (Fix Xcode project references to the source tree, 2009-09-22, v2.8.0~43) we force source file references to use relative paths from the source tree. If the source tree path is a symbolic link inside the build tree, the relative `../` sequence goes to the wrong place. The problem with debug breakpoints motivating that change does not seem to occur in modern Xcode versions, so update the logic to use a relative path only when it does not need to start in any `../` sequence.
* | | | | | Merge topic 'genex-LINK_GROUP'Brad King2022-03-01115-0/+872
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0a81ea1f12 Genex-LINK_GROUP: Add possibility to group libraries at link step a9928eb4a5 SunPro C: ensure LINKER: prefix is usable for all versions 01ff75b2ff cmComputeDepends::LinkEntry: introduce enum to specify item type Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7005
| * | | | | Genex-LINK_GROUP: Add possibility to group libraries at link stepMarc Chevrier2022-02-28115-0/+872
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: #23121
* | | | | | Tests: Extend RunCMake.SymlinkTrees with more symlink layoutsBrad King2022-02-2423-0/+235
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Inspired-by: Ben Boeckel <ben.boeckel@kitware.com> Issue: #16228
* | | | | | Tests: Extend RunCMake.SymlinkTrees to verify paths passed to compilerBrad King2022-02-244-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Verify that the paths to source files and include directories are passed to the compiler with the symlinks preserved.
* | | | | | Tests: Extend RunCMake.SymlinkTrees with directory argument variantsBrad King2022-02-241-2/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Run each symlink layout case with various ways to pass the source and binary directories.
* | | | | | Tests: Generalize RunCMake.SymlinkTrees implementationBrad King2022-02-242-11/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Accept paths to the source and binary directories as arguments. Prepare to support more ways of passing the source and binary directories to `cmake`.
* | | | | | Tests: Simplify RunCMake.SymlinkTrees per-case implementationBrad King2022-02-244-10/+7
|/ / / / / | | | | | | | | | | | | | | | Avoid needing a `.cmake` file named for every case.
* | | | | Merge topic 'correct_multiple_source_warnings'Brad 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'Brad 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 '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
| * \ \ 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
* | \ \ \ Merge topic 'test-qt-disable'Brad 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 'LINK_LIBRARY-updates'Brad King2022-02-1727-90/+90
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 397ee55cd6 genex-LINK_LIBRARY: rename configuration variables Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !6994
| * | | | | genex-LINK_LIBRARY: rename configuration variablesMarc Chevrier2022-02-1627-90/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To be more consistent between genex and variables as well as the forecomming LINK_GROUP genex, rename variable *_LINK_USING_<FEATURE>* in *_LINK_LIBRARY_USING_<FEATURE>*
* | | | | | Merge topic 'test-RunCMake-xcodebuild-incidental'Brad King2022-02-171-0/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6ade07ef89 Tests: Teach RunCMake to ignore Xcode extension point warnings Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6992
| * | | | | | Tests: Teach RunCMake to ignore Xcode extension point warningsBrad King2022-02-161-0/+1
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some Xcode versions, `xcodebuild` may warn: ... xcodebuild[...] Requested but did not find extension point with identifier ... Teach RunCMake to drop such incidental lines before matching against expected output.
* | | | | | Merge topic 'cmake-empty-cmd-line-arg'Brad 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
| | | | |