summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | GoogleTest: Add DISCOVERY_EXTRA_ARGS to gtest_discover_tests()Cedric Martineau2024-10-044-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | Fixes: #26261 Co-authored-by: Craig Scott <craig.scott@crascit.com>
* | | | | Deprecate compatibility with CMake versions older than 3.10Brad King2024-10-0332-35/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue a deprecation warning on calls to `cmake_minimum_required` or `cmake_policy` that set policies based on versions older than 3.10. Note that the effective policy version includes `...<max>` treatment. Update the check from commit 3a4791548d (Deprecate compatibility with CMake versions older than 3.5, 2023-02-09, v3.27.0-rc1~508^2).
* | | | | Tests: Update cmake_minimum_required versions to 3.10Brad King2024-10-03338-353/+355
| | | | |
* | | | | Tests/RunCMake: Update cmake_minimum_required versions to 3.10Brad King2024-10-03190-189/+237
| | | | | | | | | | | | | | | | | | | | | | | | | For policy-specific tests, use the version before the policy was introduced. Otherwise, use 3.10 where possible.
* | | | | Tests/RunCMake: Match diagnostic line numbers more robustlyBrad King2024-10-0352-78/+78
| | | | |
* | | | | Static libraries de-duplication: keep first occurrenceMarc Chevrier2024-10-022-19/+23
| | | | | | | | | | | | | | | | | | | | Fixes: #26335
* | | | | Tests/RunCMake/LinkLibrariesStrategy: Check ordering results more stronglyBrad King2024-10-0211-2/+62
|/ / / /
* | | | Merge topic 'preserve-empty-args-test-command-lines'Brad King2024-10-0211-29/+171
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fc7aa3cd69 tests: Preserve empty arguments in test command lines 9f1703530b Help: Add pre-test to prose for gtest_discover_tests() Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9575
| * | | | tests: Preserve empty arguments in test command linesCraig Scott2024-10-0211-29/+171
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will now preserve empty values in the TEST_LAUNCHER and CROSSCOMPILING_EMULATOR target properties for tests added by: - The add_test() command. - The ExternalData_Add_Test() command from the ExternalData module. - The gtest_add_tests() or gtest_discover_tests() commands from the GoogleTest module. For the gtest_add_tests() and gtest_discover_tests() commands, empty elements in the values passed after the EXTRA_ARGS keyword are also now preserved. Policy CMP0178 is added to provide backward compatibility with the old behavior where empty values were silently discarded from the above cases. Fixes: #26337
* | | | VS: Honor VS_TOOL_OVERRIDE for known source file types tooDarragh Coy2024-10-015-0/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Visual Studio Generator: The `VS_TOOL_OVERRIDE` source file property would previously only be respected for file types that CMake didn't know how to build out of the box. This change allows the user to override how any source file is built with a custom build tool, even ones with standard/recognized extensions such as `.cxx`, `.idl`, etc. Fixes: #26336
* | | | Merge topic 'FindOpenMP-CUDA'Brad King2024-09-302-6/+13
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8f4cea94da FindOpenMP: Add support for CUDA when supported by the toolchain f8ed4d7c21 FindOpenMP: Factor out compiler id lookup 534923428a FindOpenMP: Simplify compiler driver check 42bf0f596e FindOpenMP: Simplify explicit "omp" library checks 5204262c0e ci: add libomp to cuda12.2 base image Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9861
| * | | | FindOpenMP: Add support for CUDA when supported by the toolchainBrad King2024-09-272-6/+13
| |/ / / | | | | | | | | | | | | NVCC supports OpenMP on the host when the host compiler does.
* | | | Merge topic 'aix-archive-shared-libraries'Brad King2024-09-301-0/+16
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | 6c12e0758b Ninja: Fix AIX shared library archiving Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9857
| * | | Ninja: Fix AIX shared library archivingAditya Vidyadhar Kamath2024-09-271-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend commit d27fe9dfba (AIX: Add option to archive shared libraries, 2024-06-18) to update the Ninja generator to support the new `AIX_SHARED_LIBRARY_ARCHIVE` feature. Fixes: #26332
* | | | Merge topic 'curl-tls-version'Brad King2024-09-274-8/+7
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 38390245a2 ctest: Require minimum TLS 1.2 by default 5e1a59dc2b file(DOWNLOAD/UPLOAD): Require minimum TLS 1.2 by default Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9848
| * | | | file(DOWNLOAD/UPLOAD): Require minimum TLS 1.2 by defaultBrad King2024-09-264-8/+7
| | | | | | | | | | | | | | | | | | | | Fixes: #25701
* | | | | Merge topic 'link-strategy'Brad King2024-09-2627-0/+177
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7abd3137b7 Linking: Optionally reorder direct dependencies from LINK_LIBRARIES 9285a9dc9a cmComputeLinkDepends: Add final dependency ordering to debug output f792db4ca2 cmComputeLinkDepends: Add undocumented per-target debug property 80b469a51d cmComputeLinkDepends: Factor out string literals as named constants 3bd73fcc76 cmComputeLinkDepends: Modernize member initialization 8db69c767b cmComputeLinkDepends: Remove redundant member dccdd030cd cmComputeLinkDepends: Replace depender index sentinel value with cm::optional 6c9d8dc243 cmComputeLinkDepends: Replace group index sentinel value with cm::optional ... Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !9835
| * | | | | Linking: Optionally reorder direct dependencies from LINK_LIBRARIESBrad King2024-09-2527-0/+177
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Traditionally CMake generates link lines by starting with the direct link dependencies specified by `LINK_LIBRARIES` in their original order and then appending indirect dependencies that the direct dependencies do not express. This gives projects control over ordering among independent entries, which can be important when intermixing flags and libraries, or when multiple libraries provide the same symbol. However, it may also result in inefficient link lines. Add support for an alternative strategy that can reorder direct link dependencies to produce more efficient link lines. This is useful for projects that cannot easily specify their targets' direct dependencies in an order that satisfies indirect dependencies. Add a `CMAKE_LINK_LIBRARIES_STRATEGY` variable and corresponding `LINK_LIBRARIES_STRATEGY` target property to select a strategy. Fixes: #26271
* | | | | Merge topic 'net-sdk-configurations'Brad King2024-09-263-0/+32
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 55a5094f0e VS: Fix missing <Configurations> property for DOTNET_SDK Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9849
| * | | | | VS: Fix missing <Configurations> property for DOTNET_SDKCalum Robinson2024-09-253-0/+32
| | |/ / / | |/| | | | | | | | | | | | | Fixes #26325
* | | | | Tests: Honor CUDAFLAGS in all CUDA testsBrad King2024-09-252-8/+4
|/ / / /
* | | | Merge topic 'curl-tls-version'Brad King2024-09-259-11/+87
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5d2ea8371d Tests/RunCMake/file-DOWNLOAD: Add case covering TLS_VERSION values c864ffceb7 Tests/RunCMake/file-DOWNLOAD: Clarify name of invalid TLS_VERSION case Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9845
| * | | | Tests/RunCMake/file-DOWNLOAD: Add case covering TLS_VERSION valuesBrad King2024-09-246-0/+76
| | | | |
| * | | | Tests/RunCMake/file-DOWNLOAD: Clarify name of invalid TLS_VERSION caseBrad King2024-09-244-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | The test case is about an invalid version specification, not a TLS version unsupported by the server.
* | | | | Merge topic 'nested_linker_prefixes'Brad King2024-09-257-18/+46
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e3895f4a8b Linking: Preserve nested LINKER: prefixes as written 4185dfbe1b Tests/LINK_OPTIONS: extract common code in test (NFC) 54381b5a81 Linking: extract wrapping linker options to a lambda (NFC) Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9823
| * | | | Linking: Preserve nested LINKER: prefixes as writtenGergely Meszaros2024-09-237-4/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously LINKER:,-Xlinker and -Wl, options nested inside LINKER: prefixes would be transformed to separate prefixed options. This is confusing and undocumented behavior, instead preserve these as written. Fixes: #26298
| * | | | Tests/LINK_OPTIONS: extract common code in test (NFC)Gergely Meszaros2024-09-181-16/+14
| | | | |
* | | | | Merge topic 'curl-tls-verify'Brad King2024-09-242-3/+3
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4e62bc943c ctest: Verify TLS server certificate by default 8e92ee34f6 file(DOWNLOAD/UPLOAD): Verify TLS server certificate by default dcaea54898 cmCTestCurl: Clarify names and logic using optional<bool> 03d37ae3ff cmFileCommand: Clarify names and logic using optional<bool> Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9843
| * | | | | file(DOWNLOAD/UPLOAD): Verify TLS server certificate by defaultBrad King2024-09-242-3/+3
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the connection fails in a way that might be a certificate error, and verification was enabled by the new default, mention environment variable `CMAKE_TLS_VERIFY` in the diagnostic to help users that were relying on the old behavior turn off server certificate verification in their environment. Fixes: #23608
* | | | | Tests/FindOpenMP: Verify linking to OpenMP librariesBrad King2024-09-232-4/+7
| | | | | | | | | | | | | | | | | | | | Previously we only verified the `_OPENMP` preprocessor symbol.
* | | | | Tests/FindOpenMP: Add label for Fortran when it is enabledBrad King2024-09-231-0/+3
| | | | |
* | | | | Merge topic 'cuda-host-compiler-id'Brad King2024-09-2329-149/+122
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3b4d0df670 NVCC: Detect host compiler id and version 38cacd83a5 Tests: Migrate compiler id tests to RunCMake infrastructure 37173f1ccc Tests/RunCMake: Generalize construction of arguments for languages to test Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !9841
| * | | | | NVCC: Detect host compiler id and versionBrad King2024-09-204-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Report them in `CMAKE_<LANG>_HOST_COMPILER_{ID,VERSION}` variables. Fixes: #20901
| * | | | | Tests: Migrate compiler id tests to RunCMake infrastructureBrad King2024-09-2029-144/+97
| | | | | |
| * | | | | Tests/RunCMake: Generalize construction of arguments for languages to testBrad King2024-09-201-5/+5
| |/ / / /
* | | | | Merge branch 'backport-project-vars' into project-varsBrad King2024-09-205-0/+40
|\ \ \ \ \ | |/ / / / |/| | / / | | |/ / | |/| |
| * | | project: Only define non-cache vars if already definedCraig Scott2024-09-205-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In c1ece78d11 (project: non cache <project> prefix variables are also created, 2024-08-27), we started explicitly setting the non-cache variable for <projectName>_SOURCE_DIR, <projectName>_BINARY_DIR, and <projectName>_IS_TOP_LEVEL in addition to setting them as cache variables. This changed the behavior when a project name was used more than once, and the second project call happens in the same scope or a child scope of the first. Previously, the first project call would set cache variables, and the second project call would not overwrite those cache variables. With the change in c1ece78d11, after the second project call the non-cache variables would mask the cache variables and the project code would see a different value to what it did before. Setting the non-cache variable was added to handle the case where a call to FetchContent_MakeAvailable() would set some non-cache variables, and it just so happened those matched the same cache variables that the project() command would set in the project being fetched. The fetched project would then see a different set of project-specific variables compared to when it was built standalone. This commit here narrows the change from c1ece78d11 such that the non-cache variable is only set by project() if there was already a non-cache variable set. This still fixes the motivating problem c1ece78d11 was intended to solve, but it avoids changing the variable values seen by a project that re-uses the same project name in related scopes. Issue: #26243, #25714 Fixes: #26281
* | | | Merge topic 'normalize-install-destination-paths'Brad King2024-09-2016-10/+147
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6a1fac1450 install: Normalize DESTINATION paths 2184fcfb00 Tests: Configure RunCMake.install cases with correct build type 5a8a6dfe81 cmGeneratorExpression: Change Find() parameter type to cm::string_view d810374b3d install(PACKAGE_INFO): Remove outdated TODO comment d13ed01d54 Tests: Remove unused files from RunCMake.install Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9800
| * | | | install: Normalize DESTINATION pathsCraig Scott2024-09-1914-0/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The file generated by install(EXPORT) computes _IMPORT_PREFIX in a way that assumes a normalized path. If the DESTINATION contains any ../ components, the computed _IMPORT_PREFIX would be wrong. Force the DESTINATION path to be normalized, subject to the new CMP0176 policy. Also normalize all other DESTINATION paths for consistency, except for INCLUDES DESTINATION, which is not strictly a destination but rather a search path to add. Fixes: #26252
| * | | | Tests: Configure RunCMake.install cases with correct build typeCraig Scott2024-09-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The run_install_test() function would build and install with the configuration hard-coded to Debug, but the configuration step did not specify any configuration. This resulted in a "no config" configuration, and the install step then wouldn't install the Debug export files. This would only be a problem if using a single config CMake generator, and it appears none of the existing tests relied on actually installing the config-specific export file.
| * | | | Tests: Remove unused files from RunCMake.installCraig Scott2024-09-172-10/+0
| | | | |
* | | | | Merge topic 'install-type-libexec'Brad King2024-09-194-0/+7
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 39603a7e5c install: Add TYPE LIBEXEC for FILES and DIRECTORY Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9817
| * | | | | install: Add TYPE LIBEXEC for FILES and DIRECTORYChen Linxuan2024-09-184-0/+7
| |/ / / / | | | | | | | | | | | | | | | Signed-off-by: Chen Linxuan <me@black-desk.cn>
* | | | | VS: Fix custom commands for DOTNET_SDK buildsCalum Robinson2024-09-185-11/+4
| | | | | | | | | | | | | | | | | | | | Fixes: #23723
* | | | | Merge topic 'execute_process-encoding'Brad King2024-09-183-0/+7
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 20f059d025 execute_process: Warn on unknown ENCODING value Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9825
| * | | | | execute_process: Warn on unknown ENCODING valueBrad King2024-09-173-0/+7
| |/ / / /
* | | | | Merge topic 'vs-always-restore-net-sdk'Brad King2024-09-183-2/+10
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3283ef47d1 VS: Fix DOTNET_SDK builds when no VS_PACKAGE_REFERENCES set Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9807
| * | | | | VS: Fix DOTNET_SDK builds when no VS_PACKAGE_REFERENCES setCalum Robinson2024-09-163-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nuget restore always needs to be run for the new DOTNET_SDK style projects, even when VS_PACKAGE_REFERENCES is empty. Fixes: #23405
* | | | | | Merge topic 'autogen-exe-per-config'Brad King2024-09-181-7/+16
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 32c8cb2960 Autogen: Avoid running multiple cmake_autogen command in Xcode Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !9810
| * | | | | | Autogen: Avoid running multiple cmake_autogen command in XcodeOrkun Tokdemir2024-09-151-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 7c39dabdbc (Autogen: AUTO*_EXECUTABLE: add support for per-config values, 2023-10-18, v3.29.0-rc1~105^2~1) we were accidentally running cmake_autogen multiple times for each config. Fixes: #26282