diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2014-10-07 20:46:11 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2014-10-07 21:14:46 (GMT) |
commit | ba907f7dc21163df29872a221dfeae18379319c6 (patch) | |
tree | 6c37e933157d3112107f2b2887c57973dc669588 /Tests/RunCMake/FPHSA | |
parent | 4f9bf4468bd5bcd48be080fa0bc736ebb9df4769 (diff) | |
download | CMake-ba907f7dc21163df29872a221dfeae18379319c6.zip CMake-ba907f7dc21163df29872a221dfeae18379319c6.tar.gz CMake-ba907f7dc21163df29872a221dfeae18379319c6.tar.bz2 |
FPHSA: fix when requested or found version is exactly 0
Until now it was checked with "if(VAR)", which will be false in case "0" is the
content of the variable.
Diffstat (limited to 'Tests/RunCMake/FPHSA')
-rw-r--r-- | Tests/RunCMake/FPHSA/RunCMakeTest.cmake | 5 | ||||
-rw-r--r-- | Tests/RunCMake/FPHSA/exact_0-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/FPHSA/exact_0.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/FPHSA/exact_0_matching.cmake | 1 |
4 files changed, 8 insertions, 0 deletions
diff --git a/Tests/RunCMake/FPHSA/RunCMakeTest.cmake b/Tests/RunCMake/FPHSA/RunCMakeTest.cmake index 37c18d0..bb7743c 100644 --- a/Tests/RunCMake/FPHSA/RunCMakeTest.cmake +++ b/Tests/RunCMake/FPHSA/RunCMakeTest.cmake @@ -14,6 +14,7 @@ run_cmake(exact_1.2.3) run_cmake(exact_1.2.3.4) # now test every component with an invalid version +run_cmake(exact_0) run_cmake(exact_2) run_cmake(exact_1.1) run_cmake(exact_1.3) @@ -21,3 +22,7 @@ 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) + +# check if searching for a version 0 works +list(APPEND RunCMake_TEST_OPTIONS "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" "-DPseudo_VERSION=0") +run_cmake(exact_0_matching) diff --git a/Tests/RunCMake/FPHSA/exact_0-result.txt b/Tests/RunCMake/FPHSA/exact_0-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_0-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/FPHSA/exact_0.cmake b/Tests/RunCMake/FPHSA/exact_0.cmake new file mode 100644 index 0000000..432887b --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_0.cmake @@ -0,0 +1 @@ +find_package(Pseudo 0 EXACT REQUIRED) diff --git a/Tests/RunCMake/FPHSA/exact_0_matching.cmake b/Tests/RunCMake/FPHSA/exact_0_matching.cmake new file mode 100644 index 0000000..432887b --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_0_matching.cmake @@ -0,0 +1 @@ +find_package(Pseudo 0 EXACT REQUIRED) |