mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-26 16:18:43 -05:00
3e6466eb16
Teach find_package to check a CPS package's version (when provided) against a version request given to the find_package invocation.
32 lines
802 B
CMake
32 lines
802 B
CMake
include(RunCMake)
|
|
|
|
run_cmake(ExperimentalWarning)
|
|
|
|
# Enable experimental feature and suppress warnings
|
|
set(RunCMake_TEST_OPTIONS
|
|
-Wno-dev
|
|
"-DCMAKE_EXPERIMENTAL_FIND_CPS_PACKAGES:STRING=e82e467b-f997-4464-8ace-b00808fff261"
|
|
)
|
|
|
|
# Version-matching tests
|
|
run_cmake(ExactVersion)
|
|
run_cmake(CompatVersion)
|
|
run_cmake(MultipleVersions)
|
|
run_cmake(VersionLimit1)
|
|
run_cmake(VersionLimit2)
|
|
run_cmake(TransitiveVersion)
|
|
run_cmake(CustomVersion)
|
|
|
|
# Version-matching failure tests
|
|
run_cmake(MissingVersion1)
|
|
run_cmake(MissingVersion2)
|
|
run_cmake(VersionLimit3)
|
|
run_cmake(VersionLimit4)
|
|
|
|
# Component-related failure tests
|
|
run_cmake(MissingTransitiveDependency)
|
|
run_cmake(MissingComponent)
|
|
run_cmake(MissingComponentDependency)
|
|
run_cmake(MissingTransitiveComponent)
|
|
run_cmake(MissingTransitiveComponentDependency)
|