mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-26 00:00:39 -05:00
d92b6c3e20
Adds support for "symbolic" components, which represent feature-level capabilities of a package that do not correspond to actual build targets. These are modeled as pseudo-targets, using the INTERFACE type as a base, and can be queried via: get_target_property(... <tgt> "SYMBOLIC") This enables consumers to declare requirements on optional features (e.g., SSL support) even when they do not map to concrete targets. Fixes: #27187
61 lines
1.7 KiB
CMake
61 lines
1.7 KiB
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"
|
|
"-DCMAKE_EXPERIMENTAL_FIND_CPS_PACKAGES:STRING=e82e467b-f997-4464-8ace-b00808fff261"
|
|
)
|
|
|
|
function(run_cmake_install test)
|
|
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${test}-build)
|
|
if (NOT RunCMake_GENERATOR_IS_MULTI_CONFIG)
|
|
list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Release)
|
|
endif()
|
|
|
|
run_cmake(${test})
|
|
|
|
set(RunCMake_TEST_NO_CLEAN TRUE)
|
|
run_cmake_command(${test}-build ${CMAKE_COMMAND} --build . --config Release)
|
|
run_cmake_command(${test}-install ${CMAKE_COMMAND} --install . --config Release)
|
|
endfunction()
|
|
|
|
# Test incorrect usage
|
|
run_cmake(BadArgs1)
|
|
run_cmake(BadArgs2)
|
|
run_cmake(BadName)
|
|
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(Component)
|
|
run_cmake(InterfaceProperties)
|
|
run_cmake(Metadata)
|
|
run_cmake(ProjectMetadata)
|
|
run_cmake(NoProjectMetadata)
|
|
run_cmake(Minimal)
|
|
run_cmake(MinimalVersion)
|
|
run_cmake(LowerCaseFile)
|
|
run_cmake(Requirements)
|
|
run_cmake(TargetTypes)
|
|
run_cmake(DependsMultiple)
|
|
run_cmake(DependsMultipleNotInstalled)
|
|
run_cmake(Config)
|
|
run_cmake(EmptyConfig)
|
|
run_cmake(FileSetHeaders)
|
|
run_cmake(DependencyVersionCMake)
|
|
run_cmake(DependencyVersionCps)
|
|
run_cmake(TransitiveSymbolicComponent)
|
|
run_cmake(InstallSymbolicComponent)
|
|
run_cmake_install(Destination)
|