summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'iface-public-modules' into release-3.31Brad King2024-12-1215-2/+56
|\ | | | | | | | | | | | | | | | | 854eba0c53 target_sources: Improve error message for CXX_MODULES on INTERFACE libraries cd179e7560 Tests/RunCMake/CXXModules: Rename FileSetModules cases to be more specific Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !10090
| * target_sources: Improve error message for CXX_MODULES on INTERFACE librariesBrad King2024-12-1110-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We support non-compiled `SOURCES` on `INTERFACE` libraries, and also support `CXX_MODULES` on *imported* `INTERFACE` libraries (via synthetic targets that compile module interface units). However, we do not support `CXX_MODULES` on non-imported `INTERFACE` libraries because there is no place to hold module interface unit's object files for their module initializers. Previously this was not explicitly rejected, and so was diagnosed only by "CMake Internal Error" messages due to assumption violations in the implementation. Fixes: #26524 Co-authored-by: Ben Boeckel <ben.boeckel@kitware.com>
| * Tests/RunCMake/CXXModules: Rename FileSetModules cases to be more specificBrad King2024-12-116-2/+7
| | | | | | | | They all add `CXX_MODULES` to `STATIC` libraries.
| * Merge topic 'test-cuda-bin2c-null' into release-3.30Brad King2024-10-191-1/+1
| |\ | | | | | | | | | | | | | | | | | | 0c1d290090 Tests: Ensure CUDA bin2c output is null terminated Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9917
| * \ Merge branch 'test-cuda-simplify-kernels' into release-3.30Brad King2024-10-181-7/+0
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | ee9e2216ec Tests: Simplify CUDA kernels avoid crash with nvidia driver 550 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9913
* | | | Ninja: Add missing top-level codegen dependencies on per-directory codegenBrad King2024-12-107-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 197cb419d1 (add_custom_command: Add CODEGEN support, 2024-05-27, v3.31.0-rc1~394^2) we accidentally left out the global `codegen` target's dependencies on the per-directory `codegen` targets. Add them for parity with the `all` target. Fixes: #26517
* | | | VS: Restore support for mixing C++23 and C in one target with clang-clBrad King2024-12-091-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 474eafe28c (clang-cl: Add support for C++23, 2024-09-13, v3.31.0-rc1~97^2) we use a Clang-specific flag to enable C++23 since `clang-cl` has no `-std:c++23` flag, and `-std:c++latest` may enable an even newer version of C++. However, in `.vcxproj` files there is no way to express a target-wide `-clang:-std=c++23` flag for only C++ sources when the target also has C sources. Add a special case to map back to `-std:c++latest` for targets with C++23 and C together. Fixes: #26508
* | | | Merge topic 'autogen-revert-ui-rebuild' into release-3.31Brad King2024-12-0515-294/+76
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | debc4d3906 Autogen: Revert adding ui files to byproducts of the timestamp target Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !10056
| * | | | Autogen: Revert adding ui files to byproducts of the timestamp targetOrkun Tokdemir2024-12-0415-294/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When `ui_` include directives have different paths than `CMakeLists.txt`, the dependency graph is not generated correctly. This is the root cause of #16776. However, when #26135 was fixed by commit 5363bebc1e (Autogen: Fix compilation of unchanged source files, 2024-07-16, v3.31.0-rc1~328^2), it made #16776 worse: the build is always dirty. Revert the fix for now. Fixes: #26485 Issue: #26135 Issue: #25436
* | | | | LINK_OPTIONS: Fix crash on empty LINKER: prefixBrad King2024-12-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit e3895f4a8b (Linking: Preserve nested LINKER: prefixes as written, 2024-09-17, v3.31.0-rc1~60^2) we may increment an iterator past the end. Revise logic to avoid that. Fixes: #26499
* | | | | FindPython: Ensure SABIModule is found in all casesMarc Chevrier2024-12-021-0/+49
|/ / / / | | | | | | | | | | | | Fixes: #26493
* | | | Autogen: Fix Ninja Multi-Config dependency graph regressionOrkun Tokdemir2024-11-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 5363bebc1e (Autogen: Fix compilation of unchanged source files, 2024-07-16, v3.31.0-rc1~328^2) we relied on Ninja Multi-Config dependency graph optimizations from commit 7c39dabdbc (Autogen: AUTO*_EXECUTABLE: add support for per-config values, 2023-10-18, v3.29.0-rc1~105^2~1). However, those graph optimizations are conditional on versions of Qt that enable [`AUTOGEN_BETTER_GRAPH_MULTI_CONFIG`](https://codereview.qt-project.org/c/qt/qtbase/+/513648). `UseBetterGraph` should be checked to add ui files to `timestampByproducts`. Fixes: #26475
* | | | Merge topic 'aix-archive-shared-libraries-export' into release-3.31Brad King2024-11-235-9/+17
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cd6fb63093 AIX: Propagate AIX_SHARED_LIBRARY_ARCHIVE through exports Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !10027
| * | | | AIX: Propagate AIX_SHARED_LIBRARY_ARCHIVE through exportsBrad King2024-11-225-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach `export()` and `install(EXPORT)` to record this setting on the imported targets they generate. Make this property's non-presence authoritative on imported targets since they represent what was built elsewhere.
* | | | | AIX: Disallow TARGET_SONAME_* genex for AIX_SHARED_LIBRARY_ARCHIVE targetsBrad King2024-11-219-3/+44
|/ / / / | | | | | | | | | | | | | | | | AIX shared library archives have no filesystem artifact named with their SONAME because it is in an archive.
* | | | cmExperimental: Make CPS-export experimental notice more consistentMatthew Woehlke2024-11-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | There is an inadvertent inconsistency in the notice for the CPS export experimental feature as compared to other experimental feature notices. Change it to be consistent.
* | | | LLD linker: avoid regression on archive libraries deduplicationMarc Chevrier2024-11-182-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to a bug on LLD linker for ELF binaries, deduplication should occur only if CMP0156 and CMP0179 are NEW. Fixes: #26447
* | | | CMP0175: Do not reject USES_TERMINAL for add_custom_command(TARGET)Craig Scott2024-11-153-4/+5
| | | | | | | | | | | | | | | | Fixes: #26449
* | | | Clarify advice given by compatibility deprecation message for CMake < 3.10Brad King2024-11-1428-60/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 84db8506ff (Deprecate compatibility with CMake versions older than 3.10, 2024-10-03, v3.31.0-rc1~23^2) the `cmake_minimum_required` and `cmake_policy` commands warn if the project does not enable policies as of 3.10 or higher. Clarify the advice given in the warning message about how to update the version specification, particularly without actually requiring a newer minimum version of CMake.
* | | | GoogleTest: Clear script content buffer on flush and flush less oftenCraig Scott2024-11-124-10/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no need to check if flushing is needed after every command is added to the variable holding the script content. It is enough to only check once per test name. This simplifies the flushing logic, removing the need for a separate flush_script() command. Previously, we were not clearing the flushed script contents in all cases, but this is now rigorously enforced at the one location where flushing is performed. Also simplify the flushing of the list of test names, since that too doesn't need a separate command. It is simpler and safer to handle that directly inline where the one call to flush_tests_buffer() was previously being made. Fixes: #26431
* | | | cmake_parse_arguments: Restore capture of value after repeated keywordCraig Scott2024-10-282-4/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a single-value keyword is repeated, and the first instance is missing a value, it prevents the value from the second instance from being stored in a variable. This was a regression introduced by commit ceeea4e511 (cmake_parse_arguments: Set variable if empty string given after keyword, 2024-08-18). That change also didn't create a variable if the keyword was given but without a value. The purpose of the change was to always define a variable if a keyword was given. Lastly, that change didn't protect the CMP0174 logic to make it only apply to the PARSE_ARGV form. The first two of the above problems are fixed here by tracking the keywords given instead of checking which keywords were missing values. The third problem is also fixed here, being tightly coupled to the same logic as the first two problems. Fixes: #26397
* | | | Merge topic 'link-strategy' into release-3.31Brad King2024-10-2823-12/+12
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 39fd396421 LINK_LIBRARIES_STRATEGY: Rename strategies to clarify expectations Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Acked-by: Craig Scott <craig.scott@crascit.com> Merge-request: !9949
| * | | | LINK_LIBRARIES_STRATEGY: Rename strategies to clarify expectationsBrad King2024-10-2523-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 7abd3137b7 (Linking: Optionally reorder direct dependencies from LINK_LIBRARIES, 2024-09-19, v3.31.0-rc1~53^2) the strategy name `PRESERVE_ORDER` has led users to expect that it strictly preserves order. While the part of the link line generation logic controlled by `LINK_LIBRARIES_STRATEGY` does preserve order, it is not the last step. Toolchain-specific de-duplication can cause the order to change on the actual link line generated in the build system. Rename the strategies: * `PRESERVE_ORDER` => `REORDER_MINIMALLY` * `REORDER` => `REORDER_FREELY` The new names make it clear that reordering is always possible, just to varying degrees. Update the `LINK_LIBRARIES_STRATEGY` documentation to clarify that the strategies do not directly control the final link line. Fixes: #26400 Issue: #26271
* | | | | Tests/RunCMake/BuildDepends: Skip LinkDepends with broken GNU ld 2.43Brad King2024-10-262-4/+10
| | | | | | | | | | | | | | | | | | | | Issue: #26401
* | | | | Tests: Fix FILE stream leaks in helper programsBrad King2024-10-262-7/+11
| | | | |
* | | | | Tests: Update FindBoost.TestPython for Python 3.13 and 3.14Brad King2024-10-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow up the python 3.13 and 3.14 support from: * commit be958c8f35 (FindPython: Add support for Python 3.14, 2024-10-17) * commit dfab044c44 (FindPython: add support for Python 3.13, 2023-08-14) with an update for the FindBoost test.
* | | | | codespell: Fix typosBrad King2024-10-256-9/+9
|/ / / /
* | | | Merge topic 'windows-kernel-mode-driver' into release-3.31Brad King2024-10-251-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 54bbd00448 WindowsKernelModeDriver: Switch to appending to variables Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9941
| * | | | WindowsKernelModeDriver: Switch to appending to variablesJoseph Snyder2024-10-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using the WindowsKernelModeDriver, do not add the new paths if the variable was not previously defined. Instead, append them to the existing value. Add a new GUID for the Experimental mode gate
* | | | | LFortran: Improve detection of implicit link information for lfortran 0.40+Brad King2024-10-245-0/+91
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | These versions of LFortran support passing `-v -Wl,-v` to the underlying compiler so we can extract the full implicit link information. Issue: #26145
* | | | Help: Fix find_package search order w.r.t. globsMatthew Woehlke2024-10-233-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add documentation to clarify that `find_package` searches paths in the specified order and stops at the first match. Clarify documentation of `CMAKE_FIND_PACKAGE_SORT_*` to match the actual behavior. Note that no behavior is actually changed, this merely improves the documentation to reflect actual behavior rather than seeming to imply something else. Also, update the test to verify that what we claim in the updated documentation is what's actually happening.
* | | | Merge topic 'test-cuda-bin2c-null' into release-3.31Brad King2024-10-191-1/+1
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | 0c1d290090 Tests: Ensure CUDA bin2c output is null terminated Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9917
| * | | Tests: Ensure CUDA bin2c output is null terminatedRobert Maynard2024-10-181-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | The default behavior of bin2c is to create binary arrays that have no null termination. So to use it as a C array we need to explicitly tell it to create valid null terminated strings. This will safely allow us to run PTX tests across all CUDA drivers.
* | | Merge topic 'fix-cps-version' into release-3.31Brad King2024-10-183-0/+41
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | f04dd93c47 cmExportPackageInfoGenerator: Fix version properties Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !9914
| * | | cmExportPackageInfoGenerator: Fix version propertiesMatthew Woehlke2024-10-173-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a small bug in cmExportPackageInfoGenerator that caused extended version properties ("compat_version", "version_schema")) to be emitted when empty. Add a test to ensure this is working as intended. Fixes: #26264
* | | | Merge topic 'test-cuda-simplify-kernels' into release-3.31Brad King2024-10-181-7/+0
|\ \ \ \ | |/ / / |/| / / | |/ / | | | | | | | | | ee9e2216ec Tests: Simplify CUDA kernels avoid crash with nvidia driver 550 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9913
| * | Tests: Simplify CUDA kernels avoid crash with nvidia driver 550Robert Maynard2024-10-181-7/+0
| | | | | | | | | | | | | | | Avoid having two identical kernels in PTX. We don't need a second kernel anyway.
* | | Revert "Ensure imported targets in sibling dirs are deduplicated"Brad King2024-10-163-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit 502610733f (Ensure imported targets in sibling dirs are deduplicated, 2024-09-15, v3.31.0-rc1~92^2). Also revert the change from a copy of the logic made by commit cd418d4bb6 (Static libraries de-duplication: keep first occurrence, 2024-09-29, v3.31.0-rc1~30^2). The logic was de-duplicating based on the target name rather than based on the library file path. Fixes: #26371 Issue: #26284
* | | Tests/RunCMake/CMP0156: Match expected results more preciselyBrad King2024-10-162-2/+2
| | |
* | | AIX: Enable versioned shared objects with CMAKE_AIX_SHARED_LIBRARY_ARCHIVEAditya Vidyadhar Kamath2024-10-102-5/+12
| | | | | | | | | | | | Closes: #26358
* | | project: Always set <PROJECT-NAME>_* as normal variablesCraig Scott2024-10-0810-11/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-introduce the behavior originally introduced in CMake 3.30.3 by commit c1ece78d11 (project: non cache <project> prefix variables are also created, 2024-08-27, v3.30.3~2^2), but this time with a policy for compatibility. Issue: #25714 Issue: #26243
* | | Merge topic 'FindOpenMP-CUDA-Clang'Brad King2024-10-081-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | a4b60d948d FindOpenMP: Add support for CUDA when compiling with Clang Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9886
| * | | FindOpenMP: Add support for CUDA when compiling with ClangBrad King2024-10-071-1/+1
| | | |
* | | | Merge topic 'test-cuda-optixir-includes'Brad King2024-10-081-0/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c75e873564 CUDA: OptiXIR test includes all required headers Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9884
| * | | | CUDA: OptiXIR test includes all required headersRobert Maynard2024-10-071-0/+1
| | | | |
* | | | | Merge topic 'project-vars'Brad King2024-10-081-1/+6
|\ \ \ \ \ | |_|/ / / |/| | | / | | |_|/ | |/| | | | | | | | | | | | | | fa07ddfebf project: Only check non-cache vars when setting project vars Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !9883
| * | | project: Only check non-cache vars when setting project varsCraig Scott2024-10-071-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change in commit 86ad7cc886 (project: Only define non-cache vars if already defined, 2024-09-15, v3.30.4~2^2) was meant to only check for non-cache variables when deciding whether to set non-cache project variables for the current call. However, it erroneously checked for any variable, including cache variables. This gives the intended result on the first run, but on subsequent runs a cache variable will exist that did not on the first run, leading to different behavior between the two runs. Fix the logic to only check for a pre-existing non-cache variable, as was originally intended. Fixes: #26355
* | | | Merge topic 'cmake--workflow-preset'Brad King2024-10-075-2/+58
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b80aa1d3a3 preset: Easier command line interface for Workflow Presets Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: scivision <michael@scivision.dev> Merge-request: !9866
| * | | | preset: Easier command line interface for Workflow PresetsKevin Tolle2024-10-055-2/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A positional option allows 'cmake --workflow --preset <preset>' to be shortened to 'cmake --workflow <preset>'. Fixes: #26270
* | | | | Merge topic 'GoogleTest-DISCOVERY_EXTRA_ARGS'Brad King2024-10-074-0/+70
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2dcba446e2 GoogleTest: Add DISCOVERY_EXTRA_ARGS to gtest_discover_tests() f55f9fd5c1 Help: Mention TEST_LIST with gtest_discover_tests() can omit tests Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !9856