mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-04 13:19:51 -05:00
4f9bf4468b
Given that you have a foobar that identifies itself as 1.2.3 from now on a find_package(foobar 1.2 EXACT) will succeed, as 1.2.3 will now be considered as being 1.2. Until now this was only the case for version 1.2.0.
24 lines
640 B
CMake
24 lines
640 B
CMake
include(RunCMake)
|
|
|
|
run_cmake(BadFoundVar)
|
|
|
|
# The pseudo module will "find" a package with the given version. Check if the
|
|
# version selection code in FPHSA works correctly.
|
|
set(RunCMake_TEST_OPTIONS "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" "-DPseudo_VERSION=1.2.3.4.5")
|
|
run_cmake(any_version)
|
|
|
|
# test EXACT mode with every subcomponent
|
|
run_cmake(exact_1)
|
|
run_cmake(exact_1.2)
|
|
run_cmake(exact_1.2.3)
|
|
run_cmake(exact_1.2.3.4)
|
|
|
|
# now test every component with an invalid version
|
|
run_cmake(exact_2)
|
|
run_cmake(exact_1.1)
|
|
run_cmake(exact_1.3)
|
|
run_cmake(exact_1.2.2)
|
|
run_cmake(exact_1.2.4)
|
|
run_cmake(exact_1.2.3.3)
|
|
run_cmake(exact_1.2.3.5)
|