diff options
author | Brad King <brad.king@kitware.com> | 2014-10-08 14:48:14 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-10-08 14:48:14 (GMT) |
commit | b3cbb9e1888494a4d5b7cdc617ef2654d7c7ab98 (patch) | |
tree | 9fdbea7b33b2e23078523656253e53fa74840b09 /Tests | |
parent | ec941fc04bf4facc7ffe45142351126262fdddee (diff) | |
parent | ba907f7dc21163df29872a221dfeae18379319c6 (diff) | |
download | CMake-b3cbb9e1888494a4d5b7cdc617ef2654d7c7ab98.zip CMake-b3cbb9e1888494a4d5b7cdc617ef2654d7c7ab98.tar.gz CMake-b3cbb9e1888494a4d5b7cdc617ef2654d7c7ab98.tar.bz2 |
Merge topic 'FPHSA_exact_version'
ba907f7d FPHSA: fix when requested or found version is exactly 0
4f9bf446 FPHSA: when EXACT version match is requested only compare the components given
Diffstat (limited to 'Tests')
24 files changed, 53 insertions, 0 deletions
diff --git a/Tests/RunCMake/FPHSA/FindPseudo.cmake b/Tests/RunCMake/FPHSA/FindPseudo.cmake new file mode 100644 index 0000000..dc3558b --- /dev/null +++ b/Tests/RunCMake/FPHSA/FindPseudo.cmake @@ -0,0 +1,6 @@ +# pseudo find_module + +set(FOOBAR TRUE) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Pseudo REQUIRED_VARS FOOBAR VERSION_VAR Pseudo_VERSION) diff --git a/Tests/RunCMake/FPHSA/RunCMakeTest.cmake b/Tests/RunCMake/FPHSA/RunCMakeTest.cmake index 0d48fa9..bb7743c 100644 --- a/Tests/RunCMake/FPHSA/RunCMakeTest.cmake +++ b/Tests/RunCMake/FPHSA/RunCMakeTest.cmake @@ -1,3 +1,28 @@ 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_0) +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) + +# 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/any_version.cmake b/Tests/RunCMake/FPHSA/any_version.cmake new file mode 100644 index 0000000..b34a540 --- /dev/null +++ b/Tests/RunCMake/FPHSA/any_version.cmake @@ -0,0 +1 @@ +find_package(Pseudo REQUIRED) 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) diff --git a/Tests/RunCMake/FPHSA/exact_1.1-result.txt b/Tests/RunCMake/FPHSA/exact_1.1-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.1-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/FPHSA/exact_1.1.cmake b/Tests/RunCMake/FPHSA/exact_1.1.cmake new file mode 100644 index 0000000..d967da9 --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.1.cmake @@ -0,0 +1 @@ +find_package(Pseudo 1.1 EXACT REQUIRED) diff --git a/Tests/RunCMake/FPHSA/exact_1.2.2-result.txt b/Tests/RunCMake/FPHSA/exact_1.2.2-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.2.2-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/FPHSA/exact_1.2.2.cmake b/Tests/RunCMake/FPHSA/exact_1.2.2.cmake new file mode 100644 index 0000000..e959f61 --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.2.2.cmake @@ -0,0 +1 @@ +find_package(Pseudo 1.2.2 EXACT REQUIRED) diff --git a/Tests/RunCMake/FPHSA/exact_1.2.3.3-result.txt b/Tests/RunCMake/FPHSA/exact_1.2.3.3-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.2.3.3-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/FPHSA/exact_1.2.3.3.cmake b/Tests/RunCMake/FPHSA/exact_1.2.3.3.cmake new file mode 100644 index 0000000..af53cc8 --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.2.3.3.cmake @@ -0,0 +1 @@ +find_package(Pseudo 1.2.3.3 EXACT REQUIRED) diff --git a/Tests/RunCMake/FPHSA/exact_1.2.3.4.cmake b/Tests/RunCMake/FPHSA/exact_1.2.3.4.cmake new file mode 100644 index 0000000..1e2baa6 --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.2.3.4.cmake @@ -0,0 +1 @@ +find_package(Pseudo 1.2.3.4 EXACT REQUIRED) diff --git a/Tests/RunCMake/FPHSA/exact_1.2.3.5-result.txt b/Tests/RunCMake/FPHSA/exact_1.2.3.5-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.2.3.5-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/FPHSA/exact_1.2.3.5.cmake b/Tests/RunCMake/FPHSA/exact_1.2.3.5.cmake new file mode 100644 index 0000000..ddb0d13 --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.2.3.5.cmake @@ -0,0 +1 @@ +find_package(Pseudo 1.2.3.5 EXACT REQUIRED) diff --git a/Tests/RunCMake/FPHSA/exact_1.2.3.cmake b/Tests/RunCMake/FPHSA/exact_1.2.3.cmake new file mode 100644 index 0000000..bf9b2a3 --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.2.3.cmake @@ -0,0 +1 @@ +find_package(Pseudo 1.2.3 EXACT REQUIRED) diff --git a/Tests/RunCMake/FPHSA/exact_1.2.4-result.txt b/Tests/RunCMake/FPHSA/exact_1.2.4-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.2.4-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/FPHSA/exact_1.2.4.cmake b/Tests/RunCMake/FPHSA/exact_1.2.4.cmake new file mode 100644 index 0000000..548a079 --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.2.4.cmake @@ -0,0 +1 @@ +find_package(Pseudo 1.2.4 EXACT REQUIRED) diff --git a/Tests/RunCMake/FPHSA/exact_1.2.cmake b/Tests/RunCMake/FPHSA/exact_1.2.cmake new file mode 100644 index 0000000..080d961 --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.2.cmake @@ -0,0 +1 @@ +find_package(Pseudo 1.2 EXACT REQUIRED) diff --git a/Tests/RunCMake/FPHSA/exact_1.3-result.txt b/Tests/RunCMake/FPHSA/exact_1.3-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.3-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/FPHSA/exact_1.3.cmake b/Tests/RunCMake/FPHSA/exact_1.3.cmake new file mode 100644 index 0000000..e36b0c5 --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.3.cmake @@ -0,0 +1 @@ +find_package(Pseudo 1.3 EXACT REQUIRED) diff --git a/Tests/RunCMake/FPHSA/exact_1.cmake b/Tests/RunCMake/FPHSA/exact_1.cmake new file mode 100644 index 0000000..adadbc4 --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.cmake @@ -0,0 +1 @@ +find_package(Pseudo 1 EXACT REQUIRED) diff --git a/Tests/RunCMake/FPHSA/exact_2-result.txt b/Tests/RunCMake/FPHSA/exact_2-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_2-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/FPHSA/exact_2.cmake b/Tests/RunCMake/FPHSA/exact_2.cmake new file mode 100644 index 0000000..55353a8 --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_2.cmake @@ -0,0 +1 @@ +find_package(Pseudo 2 EXACT REQUIRED) |