summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* 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 '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: Fix Qt*Autogen.MocIncludeSymlink test on WindowsBrad King2022-02-252-3/+7
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test runs the `Tests/QtAutogen/MocInclude` test inside symlinked directories. The `MocInclude` test previously relied on `get_filename_component(... REALPATH)` to get the real source tree location and compute the path to `AutogenCoreTest.cmake` from it. However, this does not work on Windows due to issue #17206. The test has been passing on Windows only on machines where symlinks cannot be created and the main part of the test is skipped. On machines where symlinks can be created, the test failed with that approach. Fix it by explicitly passing the path to the helper script in as a cache entry. Avoid relying on `REALPATH`.
* | | Merge topic 'test-symlink-trees'Brad King2022-02-2529-20/+370
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ef162bb40b Tests: Extend RunCMake.SymlinkTrees with more symlink layouts 802b76140d Tests: Extend RunCMake.SymlinkTrees to verify paths passed to compiler b0ac0fbe0e Tests: Extend RunCMake.SymlinkTrees with directory argument variants 6c971b5e93 Tests: Generalize RunCMake.SymlinkTrees implementation 0443bdb8d4 Tests: Simplify RunCMake.SymlinkTrees per-case implementation Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7019
| * | | 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 'ninja-gfortran-preprocess'Brad King2022-02-252-1/+9
|\ \ \ | |/ / |/| / | |/ | | | | | | 6b4885b58b Ninja: Avoid preprocessing twice with explicit Fortran_PREPROCESS Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7008
| * 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
| * \ 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
* | | | | Tests: Run CTest.UpdateP4 tests only if explicitly enabledBrad King2022-02-221-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The test occasionally fails with "Gave up waiting for server to start". Drop our heuristic so we can enable it only on specific builds.
* | | | | Tests: Print p4.log on server failure in CTest.UpdateP4Brad King2022-02-221-1/+2
| | | | |
* | | | | Tests: Preemptively create test HOME .bazaar directoryBrad King2022-02-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Occasionally one of the `CTest.UpdateBZR` tests fails with: bzr: ERROR: [...] File exists: '/.../Tests/CMakeFiles/TestHome/.bazaar' Create the directory ahead of time to eliminate any chance of a time-of-check-time-of-use race.
* | | | | 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 '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
* | \ \ \ 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 'test-try_compile-bindir'Brad King2022-02-172-18/+18
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4b47c4d0cd Tests: Use idiomatic try_compile calls in TryCompile test Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6995
| * | | | | Tests: Use idiomatic try_compile calls in TryCompile testBrad King2022-02-162-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not duplicate the `CMakeFiles/CMakeTmp` portion of the path. The `try_compile` command adds that automatically.
* | | | | | 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
| | | | | |
* | | | | | Merge topic 'test-cuda-sepcomp-ptx'Brad 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.
* | | | | Merge topic 'tll-genex-concat'Brad King2022-02-161-0/+10
|\ \ \ \ \ | | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c1e812ad4f target_link_libraries: Improve tolerance of unquoted generator expressions 5571a31648 target_link_libraries: Handle keyword arguments in dedicated code path 42590df9f9 target_link_libraries: Remove likely-broken ancient compatibility check Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6989
| * | | | 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
* | \ \ \ Merge topic 'file-download-range'Brad King2022-02-161-0/+48
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 231872ddb0 file(DOWNLOAD): Add options to download a range Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6986
| * | | | | file(DOWNLOAD): Add options to download a rangem.klimenko2022-02-151-0/+48
| | | | | |
* | | | | | Merge topic 'LINK_LIBRARY-framework'Brad King2022-02-166-0/+110
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a2cfa2da4f GenEx/LINK_LIBRARY: Add features for framework support on Apple 40178f3c90 cmGlobalGenerator: Add helper to split framework path Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6967
| * | | | | GenEx/LINK_LIBRARY: Add features for framework support on AppleMarc Chevrier2022-02-156-0/+110
| | | | | |