summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* 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
* 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
* CMP0128: Add flag in OLD mode even when standard matches the defaultRaul Tambre2022-01-233-0/+31
| | | | | | | | | Commit 4a0485be (cmStandardLevelResolver: Avoid unnecessary flags, fix unset level logic, 2021-04-29) unintentionally changed the behavior by modifying the code to match a pre-existing comment. The resulting behavior change however matches the intentions of CMP0128, so we simply need to guard it. Fixes #23122.
* CMP0128: Avoid test code duplicationRaul Tambre2022-01-237-26/+10
|
* CMP0128: Prefix test names with modeRaul Tambre2022-01-237-7/+7
| | | | Makes clear that these tests are for the NEW behaviour.
* Merge topic 'vs2022-v143-link-guard-cf' into release-3.22Brad King2022-01-133-0/+48
|\ | | | | | | | | | | | | 9e24437c91 VS: Remove the '/guard:cf' flag from v143 link flag table Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6858
| * VS: Remove the '/guard:cf' flag from v143 link flag tableBenjamin Sluis2022-01-123-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | Apply the change from commit db35e3cfd6 (VS: Fix support for '/guard:cf' linker flag for v142, 2019-01-24, v3.14.0-rc1~74^2~2) to the v143 flag table. The entry for `LinkControlFlowGuard` in `v143_Link.json` does not work when used in a `.vcxproj` file. Drop our link flag table entries for this toolset so that the flag will be passed via `AdditionalOptions`. Also add a test case.
* | file: Restore error capture in undocumented READ_ELF modeBrad King2022-01-112-2/+21
| | | | | | | | | | | | | | | | | | Revise the error message added by commit 115ff6a347 (cmELF: Include the ELF parsing code unconditionally, 2021-06-17, v3.22.0-rc1~557^2) to honor the `CAPTURE_ERROR` option. This is needed by the call site in `BundleUtilities` to suppress errors on non-ELF files. Fixes: #23074
* | FindGLUT: Provide legacy GLUT_INCLUDE_DIR result in pkg-config code pathBrad King2021-12-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Since commit f90d15458a (FindGLUT: Use pkg-config to find flags if available, 2021-06-11, v3.22.0-rc1~469^2) we return early if pkg-config provides the information. During review of that commit, code to populate the legacy `GLUT_INCLUDE_DIR` result variable was removed from that code path. Add code to provide it. Also fix the test case to use `GLUT_INCLUDE_DIR`, the result variable documented officially by the module. Fixes: #23018
* | 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 `?`.
* | 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.
* | 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
* | 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
* | 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
| * 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
* | | 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.
* | | 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.
* | | 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
| * | | NVHPC: Support SYSTEM include directoriesRobert Maynard2021-11-021-0/+1
| | | | | | | | | | | | | | | | Fixed #22834
* | | | Tests/Environment: also test modifying ambient valuesBen Boeckel2021-10-293-0/+24
| | | |
* | | | cmCTestRunTest: get the default value from the environmentBen Boeckel2021-10-292-0/+25
|/ / / | | | | | | | | | | | | | | | | | | | | | This only works due to some assumptions about how the `ENVIRONMENT` property is processed. Comments have been added to notify anyone modifying the behavior about where to look. Fixes: #22819
* | | Merge topic 'builtin-help-versionadded' into release-3.22Brad King2021-10-282-0/+12
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 054754359a cmRST: support `versionadded` and `versionchanged` directives Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6667
| * | | cmRST: support `versionadded` and `versionchanged` directivesBen Boeckel2021-10-272-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes `versionadded` and `versionchanged` directives show up in `cmake --help-*` output instead of disappearing (and potentially making empty sections). Fixes: #22808
* | | | cmCTestRunTest: fix modifying non-existent envvarsBen Boeckel2021-10-262-1/+25
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | When appending or modifying to a variable that has not been modified before, the iterator was not valid, but it was used to insert into the map again. Instead, just use indexing into the map since we know it will exist by the end of the function anyways. Fixes: #22796
* | | cmake_host_system_information: Add undocumented VS_MSBUILD_COMMAND keyBrad King2021-10-205-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using the Visual Studio generator for VS 10 or above, offer this key to get the location of the MSBuild command before the first `project()` or `enable_language()` command has finished running. This will be needed only by one of our own modules, so leave it undocumented for now.
* | | cmFileCommand: improve error messageSeth R Johnson2021-10-124-4/+12
| | | | | | | | | | | | | | | Print full list of unresolved dependencies and a phrase that indicates what about the file is unresolved.
* | | Merge topic 'revert-debian-libexec'Brad King2021-10-081-2/+2
|\ \ \ | | |/ | |/| | | | | | | | | | | | | 6658e260d4 GNUInstallDirs: Fix misinterpretation of Debian Policy on LIBEXECDIR Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6607
| * | GNUInstallDirs: Fix misinterpretation of Debian Policy on LIBEXECDIRTimo Röhling2021-10-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit 798c1c3192 (GNUInstallDirs: Comply with Debian Policy on LIBEXECDIR, 2020-10-08, v3.19.0-rc1~11^2). The Debian Policy builds upon FHS 3.0 and permits installing to `/usr/libexec`. While Policy does grant an additional exception for applications to use a single subdirectory of `/usr/lib/<triplet>`, this is not meant to replace `/usr/libexec` as valid target. Fixes: #22731
* | | Merge topic 'FindJasper-imported-target'Brad King2021-10-074-0/+44
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6e8754c625 FindJasper: Add IMPORTED target bdbce845cd FindJasper: Add JASPER_INCLUDE_DIRS result variable 7f8413c309 FindJasper: Modernize documentation layout 524205a7a5 FindJasper: Modernize code layout Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4633
| * | | FindJasper: Add IMPORTED targetHiroshi Miura2021-10-064-0/+44
| | | | | | | | | | | | | | | | | | | | Fixes: #20601 Signed-off-by: Hiroshi Miura <miurahr@linux.com>
* | | | Tests: Skip RunCMake.file INSTALL-FOLLOW_SYMLINK_CHAIN case on CygwinBrad King2021-10-062-2/+4
|/ / / | | | | | | | | | | | | | | | | | | This case was added by commit e3ff7ced63 (file(INSTALL): Add FOLLOW_SYMLINK_CHAIN argument, 2019-05-16, v3.15.0-rc1~103^2). Skip it on Cygwin because it fails due to `foo/../` pairs being flattened away in symlinks.
* | | Merge topic 'ci-xcode-13.0'Brad King2021-10-062-4/+4
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | 429522e89c gitlab-ci: update macOS jobs to use Xcode 13.0 75901f0472 Tests: Fix RunCMake.XcodeProject XcodeIOSInstallCombined cases for Xcode 13.0 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6578
| * | Tests: Fix RunCMake.XcodeProject XcodeIOSInstallCombined cases for Xcode 13.0Brad King2021-10-052-4/+4
| | | | | | | | | | | | | | | The output of `otool -vf` now contains additional content that happens to be matched by our architectures regex. Make the regex more strict.
* | | Merge topic 'xcode13-schema'Brad King2021-10-061-1/+6
|\ \ \ | |/ / | | | | | | | | | | | | | | | 0e86fea0be Tests: Specify destination for Xcode scheme Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6582
| * | Tests: Specify destination for Xcode schemeGregor Jasny2021-10-051-1/+6
| | | | | | | | | | | | | | | | | | | | | The `Using the first of multiple matching destinations` warning vanishes if we explicitly specify a destination. Fixes: #22704
* | | Merge topic 'find-blas-lapack-sizeof-integer'Brad King2021-10-067-107/+107
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 64038fd5bc Help: Add release notes for Find{BLAS,LAPACK} BLA_SIZEOF_INTEGER option 972489ae4e Find{BLAS,LAPACK}: Provide testing of BLA_SIZEOF_INTEGER 95219365ff Find{BLAS,LAPACK}: Make possible testing of ILP64 model 2cd94f3e57 Find{BLAS,LAPACK}: Specify integer type in tests 9b69307b56 Find{BLAS,LAPACK}: De-duplicate and generalize test creation logic 91fd645d46 FindLAPACK: Stop processing if LAPACK library does not have 64-bit integer API b8a3cea51f FindBLAS: Stop processing if BLAS library does not have 64-bit integer API d2f5c7856f FindLAPACK: Search 32/64-bit integer API via BLA_SIZEOF_INTEGER if possible ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6407
| * | | Find{BLAS,LAPACK}: Provide testing of BLA_SIZEOF_INTEGERIgor S. Gerasimov2021-10-055-3/+39
| | | |
| * | | Find{BLAS,LAPACK}: Make possible testing of ILP64 modelIgor S. Gerasimov2021-10-052-0/+10
| | | |
| * | | Find{BLAS,LAPACK}: Specify integer type in testsIgor S. Gerasimov2021-10-052-9/+14
| | | |
| * | | Find{BLAS,LAPACK}: De-duplicate and generalize test creation logicBrad King2021-10-053-98/+47
| | | | | | | | | | | | | | | | | | | | Interpret `CMake_TEST_FindBLAS` and `CMake_TEST_FindLAPACK` as a sequence of option assignments intermixed with vendor names.
* | | | Merge topic 'fetchcontent-CMAKE-vars-passthrough'Craig Scott2021-10-062-0/+39
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1851aa49be FetchContent: Pass through networking-related CMAKE_... variables 96937438b7 Help: Clean up how TLS and NETRC variables are discussed 2a82bd85b6 Help: Add documentation for CMAKE_TLS_CAINFO Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6589
| * | | | FetchContent: Pass through networking-related CMAKE_... variablesCraig Scott2021-10-052-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMAKE_TLS_VERIFY, CMAKE_TLS_CAINFO, CMAKE_NETRC and CMAKE_NETRC_FILE are now passed through to the underlying ExternalProject sub-build. Previously, they were silently ignored. Fixes: #22144
* | | | | Merge topic 'qt6-tests'Craig Scott2021-10-0577-165/+271
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a742088472 Tests: Add support for testing Qt6 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6587
| * | | | | Tests: Add support for testing Qt6Craig Scott2021-10-0477-165/+271
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The minimum CMake version for Qt6 is 3.16, so all the calls to cmake_minimum_required() are updated here to enforce that minimum. This will avoid any CMake version-related warnings from Qt. Avoid hard-coding Qt5 where the tests could now be using Qt5 or Qt6. Fixes: #22188