diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2014-10-03 16:49:00 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2014-10-07 21:14:45 (GMT) |
commit | 4f9bf4468bd5bcd48be080fa0bc736ebb9df4769 (patch) | |
tree | fea00a2bab7f7b936c4910076e3ea6b0224dbca3 /Tests/RunCMake/FPHSA/RunCMakeTest.cmake | |
parent | 0e0cb710d03006920bef9d8746e0966a6e48e8fb (diff) | |
download | CMake-4f9bf4468bd5bcd48be080fa0bc736ebb9df4769.zip CMake-4f9bf4468bd5bcd48be080fa0bc736ebb9df4769.tar.gz CMake-4f9bf4468bd5bcd48be080fa0bc736ebb9df4769.tar.bz2 |
FPHSA: when EXACT version match is requested only compare the components given
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.
Diffstat (limited to 'Tests/RunCMake/FPHSA/RunCMakeTest.cmake')
-rw-r--r-- | Tests/RunCMake/FPHSA/RunCMakeTest.cmake | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Tests/RunCMake/FPHSA/RunCMakeTest.cmake b/Tests/RunCMake/FPHSA/RunCMakeTest.cmake index 0d48fa9..37c18d0 100644 --- a/Tests/RunCMake/FPHSA/RunCMakeTest.cmake +++ b/Tests/RunCMake/FPHSA/RunCMakeTest.cmake @@ -1,3 +1,23 @@ 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) |