1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00
Files
CMake/Tests/RunCMake/PackageInfo/RunCMakeTest.cmake
Martin Duffy d723409e8e export: Allow multiple exports when only one export is installed
Since commit c8997fc046 (export: Allow depending on targets exported
multiple times, 2024-12-26, v4.0.0-rc1~241^2), it is possible to depend
on a target exported multiple times so long as the target is exported in
only one set and with a consistent namespace.  However, as a
side-effect, a target could not be in multiple export sets even if only
one of those sets was installed.

Update the check so that uninstalled export sets do not count towards a
target being exported multiple times.
2025-03-17 18:01:30 -04:00

38 lines
969 B
CMake

include(RunCMake)
# Test experimental gate
run_cmake(ExperimentalGate)
run_cmake(ExperimentalWarning)
# Enable experimental feature and suppress warnings
set(RunCMake_TEST_OPTIONS
-Wno-dev
"-DCMAKE_EXPERIMENTAL_EXPORT_PACKAGE_INFO:STRING=b80be207-778e-46ba-8080-b23bba22639e"
)
# Test incorrect usage
run_cmake(BadArgs1)
run_cmake(BadArgs2)
run_cmake(BadArgs3)
run_cmake(BadArgs4)
run_cmake(BadArgs5)
run_cmake(BadDefaultTarget)
run_cmake(ReferencesNonExportedTarget)
run_cmake(ReferencesWronglyExportedTarget)
run_cmake(ReferencesWronglyImportedTarget)
run_cmake(ReferencesWronglyNamespacedTarget)
run_cmake(DependsMultipleDifferentNamespace)
run_cmake(DependsMultipleDifferentSets)
# Test functionality
run_cmake(Appendix)
run_cmake(InterfaceProperties)
run_cmake(Metadata)
run_cmake(Minimal)
run_cmake(MinimalVersion)
run_cmake(LowerCaseFile)
run_cmake(Requirements)
run_cmake(TargetTypes)
run_cmake(DependsMultiple)
run_cmake(DependsMultipleNotInstalled)