summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* cmake: Add filtered debug-find optionsJohn Parent2021-12-1731-0/+427
| | | | | | | | | | Add a `--debug-find-pkg=` option to debug find calls for specific packages. Add a `--debug-find-var=` option to debug find calls for specific return variables. Fixes: #21880
* Merge topic 'fix-list-transform-invalid-index-crashes'Brad King2021-12-1410-0/+27
|\ | | | | | | | | | | | | | | 7dd3e99270 cmListCommand: Handle invalid FOR selector ranges Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !6786
| * cmListCommand: Handle invalid FOR selector rangesNick Muggio2021-12-0910-0/+27
| | | | | | | | | | | | | | | | | | Fixes crashes involving invalid ranges specified in list(TRANSFORM ... FOR ...) calls. * Report error when step is not positive * Report error when start is after stop Fixes: #22985
* | Merge topic 'tests_if_version'Brad King2021-12-091-2/+78
|\ \ | | | | | | | | | | | | | | | | | | | | | 1a813273ca Tests: Add more version comparison tests Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6791
| * | Tests: Add more version comparison testsPaweł Bylica2021-12-081-2/+78
| | |
* | | Merge topic 'ctest-add_subdirectory'Brad King2021-12-092-0/+40
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7c5a120c38 Tests: Add case covering both ctest subdirectory commands 04deda1d2a CTest: Extract common implementation of add_subdirectory and subdirs Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6795
| * | | Tests: Add case covering both ctest subdirectory commandsBrad King2021-12-082-0/+40
| | | | | | | | | | | | | | | | | | | | CTest re-implements the `subdirs` and `add_subdirectory` commands. Verify that they both work.
* | | | cmTargetPropertyComputer: Simplify by restoring use of cmMakefileBrad King2021-12-081-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Logically revert commit 390a7d8647 (cmTargetPropertyComputer: Implement GetProperty without cmMakefile, 2016-10-13, v3.8.0-rc1~445^2~9). It relied on using `cmListFileBacktrace` to get a scope in which to look up policies. This does remove a backtrace from `LOCATION` property errors at generate time, but the backtrace we reported before was incorrect. It pointed at the addition of a target, not to the reference to the property.
* | | | cmMessenger: Adopt backtrace printing functionsBrad King2021-12-081-7/+15
|/ / / | | | | | | | | | | | | | | | Move backtrace printing functions from `cmListFileBacktrace` over to `cmMessenger`, their primary caller. Thread `cmMessenger` instances through APIs needed to update other call sites.
* | | Merge topic 'lib-arch-no-usr'Brad King2021-12-078-0/+124
|\ \ \ | |/ / |/| | | | | | | | | | | | | | d4ba945c48 CMakeParseLibraryArchitecture: Fix parsing /lib/<arch> implicit object path Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6790
| * | CMakeParseLibraryArchitecture: Fix parsing /lib/<arch> implicit object pathRaphael Gozzo2021-12-068-0/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current regular expression is able to match `/usr/lib/<arch>`, `/usr/usr/lib/<arch>`, `/usr/usr/usr/lib/<arch>`, ... but not `/lib/<arch>`. This behavior ends up causing the detected architecture to be x86_64-pc-linux-gnu when the Clang compiler is installed on a "non-system" location (like /opt/llvm-13) which, in turn, makes almost every 'find_library()' fail because the correct architecture is x86_64-linux-gnu. This is due to a typo in commit 764606e256 (CMakeDetermineCompilerABI: Extract lib arch from implicit object file paths, 2021-04-05, v3.20.1~10^2), which used `+` instead of `?`.
* | | Merge topic 'ci-vs-managed'Brad King2021-12-061-1/+1
|\ \ \ | |/ / | | / | |/ |/| | | | | 69419c5870 ci: Enable more VS tests that use managed code Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6782
| * ci: Enable more VS tests that use managed codeBrad King2021-12-031-1/+1
| | | | | | | | | | | | | | A couple of VS tests were conditioned on `NOT CMAKE_GENERATOR_TOOLSET`, but in CI jobs with VS we always set `CMAKE_GENERATOR_TOOLSET`. Make the condition specific to excluding the `v90` toolset, which was its original intention anyway.
* | Merge topic 'vs-csproj-scripts'Brad King2021-12-033-0/+20
|\ \ | |/ | | | | | | | | | | 13a7ae2194 VS: Revert "Add missing label in C# project-build events" Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6781
| * VS: Revert "Add missing label in C# project-build events"Brad King2021-12-023-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit b284a21fee (VS: Add missing label in C# project-build events, 2021-09-03, v3.22.0-rc1~156^2). The change broke cases using multiple successful custom commands. Revert it pending further investigation into the interaction of the generated script code with `Microsoft.Common.CurrentVersion.targets`, and whether this is needed for all managed projects or just C# projects. Also add a test covering the case that was broken. Fixes: #22964 Issue: #21440
* | Merge topic 'rpath-unrecognized-format'Brad King2021-12-0212-0/+64
|\ \ | |/ | | | | | | | | | | | | | | 643fc46bdc file(RPATH): Restore tolerance of unknown formats if new RPATH is empty 5596cba7dc cmSystemTools: Remove unnecessary mark-as-used casts to void Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6779
| * file(RPATH): Restore tolerance of unknown formats if new RPATH is emptyBrad King2021-12-0112-0/+64
| | | | | | | | | | | | | | | | | | | | | | Since commit 2e1149874d (cmSystemTools: Support multiple binary formats, 2021-06-14, v3.22.0-rc1~575^2) the `file(RPATH_...)` operations fail on files that are not ELF or XCOFF format. Previously the RPATH operations tolerated files of unknown format if the goal was to produce a file with an empty RPATH. Restore this tolerance in order to support setting an empty RPATH on GNU ld scripts. Fixes: #22963
* | GNUInstallDirs: Update CMAKE_INSTALL_MANDIR for FreeBSDDmitry Marakasov2021-11-304-8/+8
| | | | | | | | | | | | | | FreeBSD has switched from PREFIX/man ro PREFIX/share/man see https://cgit.freebsd.org/ports/tree/CHANGES entry 20200115. Fixes: #22883
* | Merge topic 'env-init-configs'Brad King2021-11-233-0/+27
|\ \ | |/ | | | | | | | | | | | | 5b1ed2a646 try_compile: Do not use CMAKE_BUILD_TYPE or CMAKE_CONFIGURATION_TYPES env vars Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6755
| * try_compile: Do not use CMAKE_BUILD_TYPE or CMAKE_CONFIGURATION_TYPES env varsBrad King2021-11-223-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since: * commit e216b9bbd3 (cmake: Allow CMAKE_BUILD_TYPE to be set by environment variable, 2021-06-29, v3.22.0-rc1~503^2~1) * commit ef56eefc9b (cmake: Allow CMAKE_CONFIGURATION_TYPES to be set by environment variable, 2021-06-29, v3.22.0-rc1~503^2) the environment variables are supposed to provide defaults for settings the user otherwise can control via cache entries. However, they accidentally affect `try_compile` projects too, which are supposed to be programmatically controlled. Fixes: #22935
| * Merge branch 'UseSWIG-create-workingdir' into release-3.22Brad King2021-11-221-0/+1
| |\ | | | | | | | | | Merge-request: !6750
* | \ Merge topic 'FindGTest-target-for-gmock'Brad King2021-11-221-0/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 50bf457a0d FindGTest: Add target for gmock library Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6632
| * | | FindGTest: Add target for gmock libraryEero Aaltonen2021-11-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `googlemock` has been absorbed into the [googletest](https://github.com/google/googletest) project and is built and installed from the same source tree. As GTest may be built with or without GMock, skip GMock if it is not present. Do not provide result variables for GMock. They are not provided by upstream GTest's CMake Package Configuration File. Also update the test case to cover linking to `GTest::gmock`.
* | | | Merge topic 'GNUInstallDirs-multiarch-prefixes'Brad King2021-11-222-4/+4
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dd9584b352 GNUInstallDirs: Apply Debian multiarch LIBDIR to more prefixes Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6748
| * | | | GNUInstallDirs: Apply Debian multiarch LIBDIR to more prefixesMathieu Malaterre2021-11-192-4/+4
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On typical Debian amd64 system (bullseye), multiarch is setup as: ``` % cat /etc/ld.so.conf.d/x86_64-linux-gnu.conf /usr/local/lib/x86_64-linux-gnu /lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu ``` Where: ``` % apt-cache policy libc6:amd64 libc6: Installed: 2.31-13+deb11u2 Candidate: 2.31-13+deb11u2 Version table: *** 2.31-13+deb11u2 500 500 http://deb.debian.org/debian bullseye/main amd64 Packages 100 /var/lib/dpkg/status ``` Update GNUInstallDirs to support all three cases `/`, `/usr/` and `/usr/local/`. Fixes: #19698
* | | | Merge topic 'UseSWIG-create-workingdir'Brad King2021-11-221-0/+1
|\ \ \ \ | |/ / / |/| | / | | |/ | |/| | | | | | | 7224eb5185 UseSWIG: ensure directory for depfile exists Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6750
| * | UseSWIG: ensure directory for depfile existsMarc Chevrier2021-11-191-0/+1
| | | | | | | | | | | | | | | | | | | | | When `Visual Studio` and `Xcode` generators are used, directory for depfile is not implicitely created by CMake when OUTFILE_DIR option is used. Fixes: #22932
| * | Merge topic 'revert-debian-libexec' into release-3.21Brad King2021-10-081-2/+2
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | 6658e260d4 GNUInstallDirs: Fix misinterpretation of Debian Policy on LIBEXECDIR Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6607
* | \ \ Merge topic 'test-target_link_directories-chars'Brad King2021-11-171-5/+5
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7aa0c129ba Tests: Fix CMakeCommands.target_link_directories for regex chars in path Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6733
| * | | | Tests: Fix CMakeCommands.target_link_directories for regex chars in pathWenGe Wang2021-11-161-5/+5
| | | | | | | | | | | | | | | | | | | | Fixes: #22801
* | | | | Merge topic 'gtest_discover_tests-PRE_TEST-dep'Brad King2021-11-175-3/+80
|\ \ \ \ \ | |/ / / / |/| | | / | | |_|/ | |/| | | | | | | | | | | | | | 1bf6d5979d gtest_discover_tests: Re-run PRE_TEST discovery on any arg change 715af43124 Tests: Fix and update wrongly named GoogleTest stdout file Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6728
| * | | gtest_discover_tests: Re-run PRE_TEST discovery on any arg changeCraig Scott2021-11-164-0/+77
| | | | | | | | | | | | | | | | Fixes: #22912
| * | | Tests: Fix and update wrongly named GoogleTest stdout fileCraig Scott2021-11-141-3/+3
| | | | | | | | | | | | | | | | The GoogleTest-skip-test output was never being checked since this test was added due to this file having the wrong name.
* | | | Merge topic 'xcode-generation-enablegpuframecapturemode'Brad King2021-11-122-7/+19
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0798edfb85 Tests: Xcode scheme ENABLE_GPU_FRAME_CAPTURE_MODE e09a3eddb6 Xcode: Support "GPU Frame Capture" scheme property Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !6639
| * | | | Tests: Xcode scheme ENABLE_GPU_FRAME_CAPTURE_MODEJake Turner2021-11-092-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting numerical value Caseless comparison of string values "Metal" is converted to value 1 "Disabled" is converted to value 3
* | | | | Merge topic 'unity-build-per-config'Brad King2021-11-125-0/+62
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 129e3c6540 Unity Build: Fix per-config sources in multi-config generators ea289314ef VS: Fix pre-VS15.8 unity build exclusion of per-config sources 53990059da cmLocalGenerator: Add dedicated types to hold unity source info de6e362a88 cmLocalGenerator: Clarify name of method to write unity source include lines 3017b3e7d4 cmLocalGenerator: Simplify unity source copy-if-different logic 0b56f92576 cmLocalGenerator: De-duplicate unity source file generation Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6720
| * | | | | Unity Build: Fix per-config sources in multi-config generatorsBrad King2021-11-115-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Single-config generators already support unity builds with per-config sources because they compute sources using `CMAKE_BUILD_TYPE` as the configuration. Each original source is either included in the unity build source, or not. Teach multi-config generators to compute the list of sources for inclusion in unity builds using all configurations. Previously they only used the empty string as the configuration. Each original source may be included in some configurations, but not others. Use preprocessor conditions to guard their inclusion when necessary. Fixes: #22892
* | | | | | Merge topic 'cmp0128-fixup'Brad King2021-11-125-5/+32
|\ \ \ \ \ \ | | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e47dfce75d CMP0128: Enable/disable extensions if standard same as default Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6723
| * | | | | CMP0128: Enable/disable extensions if standard same as defaultRaul Tambre2021-11-115-5/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was intended to be part of the initial MR (!6177), but accidentally went missing when debugging nightly failures on less common systems. Noticed during !6711 review as the comment about this behaviour didn't match the code. Documentation for CMP0128 is updated to remove a false case and note the two cases related to this. Fixes #22224.
* | | | | | Merge topic 'xcode-embed-plugins'Brad King2021-11-113-0/+25
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9e1e7dc7db Xcode: Add embedded plugins option Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6690
| * | | | | Xcode: Add embedded plugins optionGusts Kaksis2021-11-103-0/+25
| | | | | |
* | | | | | Merge topic 'cuda_clang_cmp0105'Brad King2021-11-094-32/+35
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4707ecbe6f CUDA: Support CMP0105 on Clang 15fde4c420 CUDA: Use local shorthands for variables in Clang device link code cf7e68087d CUDA: Avoid unnecessary allocation and GetLinkLanguage() 5b0693411e CUDA: Ignore USE_WATCOM_QUOTE for device link rules Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6709
| * | | | | | CUDA: Support CMP0105 on ClangRaul Tambre2021-11-084-32/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add link flags during the "device compile" step. Enabled the relevant tests. The disable reasons regarding separable compilation were outdated and the actual failure case was device link flags support.
* | | | | | | CPack: Remove undocumented deprecated OSXX11 generatorBrad King2021-11-051-1/+0
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CPack generator was never documented, and has been deprecated since commit 2ed00e8ef8 (CPack: Deprecate OSXX11 generator, 2020-01-31, v3.17.0-rc1~45^2). Issue: #20235
* | | | | | Merge topic 'nmc-cross-config-target-deps'Brad King2021-11-055-0/+26
|\ \ \ \ \ \ | | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 95f44e00cd Ninja Multi-Config: Fix custom command target dependencies in cross-configs a883363935 Ninja Multi-Config: Fix internal cross-config target dependency ordering 16e24748c5 Ninja Multi-Config: Fix cross-config custom command dependency tracing Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6702
| * | | | | Ninja Multi-Config: Fix custom command target dependencies in cross-configsBrad King2021-11-045-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generator expressions in a non-cross custom command's `COMMAND` arguments are evaluated in the command config. Target-level dependencies implied by `TARGET_FILE` must therefore be cross dependencies. This is important to generate proper target-level dependencies on the cross-config build statements for the target to which the custom command is attached. Fixes: #22855
| * | | | | Merge topic 'nvhpc-isystem' into release-3.22Brad King2021-11-031-0/+1
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 92624714c4 NVHPC: Support SYSTEM include directories Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6691
* | \ \ \ \ \ Merge topic 'no-opt-crash'Brad King2021-11-031-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7c90d00af9 Tests: Prevent compiler optimizing away test code in CTestTestCrash Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6688
| * | | | | | | Tests: Prevent compiler optimizing away test code in CTestTestCrashWilliam R. Dieter2021-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CTestTestCrash tries to force a crash by dereferencing a NULL pointer. The oneAPI 2021.4 C compiler notices that the pointer and the value fetched from the pointer are never used and optimizes away the dereferencing of the NULL pointer, which prevents the crash, causing the test to fail. This change adds the `volatile` keyword the pointer to prevent the compiler optimizing it away. Removing a reference to a `volatile` variable is illegal because access to a `volatile` variable could have side effects not observable by the compiler. Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
* | | | | | | | Merge topic 'nvhpc-isystem'Brad King2021-11-031-0/+1
|\ \ \ \ \ \ \ \ | | |_|/ / / / / | |/| | / / / / | |_|_|/ / / / |/| | | | | | | | | | | | | | | | | | | | 92624714c4 NVHPC: Support SYSTEM include directories Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6691