diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2020-10-26 19:43:57 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2020-10-26 19:43:57 (GMT) |
commit | b8937a992b956b16a9181737f695ca118c5eea49 (patch) | |
tree | 02b30e7d14f767c28e0ef69af3351f343d7bf8c9 /Tests/RunCMake/FPHSA | |
parent | d13bd6ec3d7232b4b62d3106684f4f57951f3b28 (diff) | |
parent | 9fa7afe7d332ced27264f1ef7c921aa1d95bc476 (diff) | |
download | CMake-b8937a992b956b16a9181737f695ca118c5eea49.zip CMake-b8937a992b956b16a9181737f695ca118c5eea49.tar.gz CMake-b8937a992b956b16a9181737f695ca118c5eea49.tar.bz2 |
Merge branch 'release' into ninja-multi-per-config-sources
Diffstat (limited to 'Tests/RunCMake/FPHSA')
-rw-r--r-- | Tests/RunCMake/FPHSA/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/FPHSA/FindPseudoRange.cmake | 7 | ||||
-rw-r--r-- | Tests/RunCMake/FPHSA/RunCMakeTest.cmake | 10 | ||||
-rw-r--r-- | Tests/RunCMake/FPHSA/range_1-2-exclude-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/FPHSA/range_1-2-exclude-stderr.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/FPHSA/range_1-2-exclude.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/FPHSA/range_1-2-include.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/FPHSA/range_1-3.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/FPHSA/range_3-4-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/FPHSA/range_3-4-stderr.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/FPHSA/range_3-4.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/FPHSA/range_ignored-stderr.txt | 4 | ||||
-rw-r--r-- | Tests/RunCMake/FPHSA/range_ignored.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/FPHSA/range_no-range.cmake | 1 |
14 files changed, 34 insertions, 1 deletions
diff --git a/Tests/RunCMake/FPHSA/CMakeLists.txt b/Tests/RunCMake/FPHSA/CMakeLists.txt index 12cd3c7..74b3ff8 100644 --- a/Tests/RunCMake/FPHSA/CMakeLists.txt +++ b/Tests/RunCMake/FPHSA/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 2.8.4) +cmake_minimum_required(VERSION 3.3) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/FPHSA/FindPseudoRange.cmake b/Tests/RunCMake/FPHSA/FindPseudoRange.cmake new file mode 100644 index 0000000..ad0342c --- /dev/null +++ b/Tests/RunCMake/FPHSA/FindPseudoRange.cmake @@ -0,0 +1,7 @@ +# pseudo find_module + +set(FOOBAR TRUE) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(PseudoRange REQUIRED_VARS FOOBAR VERSION_VAR PseudoRange_VERSION + HANDLE_VERSION_RANGE) diff --git a/Tests/RunCMake/FPHSA/RunCMakeTest.cmake b/Tests/RunCMake/FPHSA/RunCMakeTest.cmake index 8e39090..28b8570 100644 --- a/Tests/RunCMake/FPHSA/RunCMakeTest.cmake +++ b/Tests/RunCMake/FPHSA/RunCMakeTest.cmake @@ -55,3 +55,13 @@ run_cmake(required_and_optional_components) run_cmake(all_optional_components) list(APPEND RunCMake_TEST_OPTIONS "-DUseComponents_REQUIRE_VARS=TRUE") run_cmake(required_components_with_vars) + +# check handling of version range +set(RunCMake_TEST_OPTIONS "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" "-DPseudo_VERSION=2.3.4.5") +run_cmake(range_ignored) +set(RunCMake_TEST_OPTIONS "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" "-DPseudoRange_VERSION=2.0") +run_cmake(range_no-range) +run_cmake(range_1-3) +run_cmake(range_1-2-include) +run_cmake(range_1-2-exclude) +run_cmake(range_3-4) diff --git a/Tests/RunCMake/FPHSA/range_1-2-exclude-result.txt b/Tests/RunCMake/FPHSA/range_1-2-exclude-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/FPHSA/range_1-2-exclude-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/FPHSA/range_1-2-exclude-stderr.txt b/Tests/RunCMake/FPHSA/range_1-2-exclude-stderr.txt new file mode 100644 index 0000000..8e34630 --- /dev/null +++ b/Tests/RunCMake/FPHSA/range_1-2-exclude-stderr.txt @@ -0,0 +1,2 @@ + Could NOT find PseudoRange: Found unsuitable version "2\.0", required range + is "1.0...<2.0" \(found TRUE\) diff --git a/Tests/RunCMake/FPHSA/range_1-2-exclude.cmake b/Tests/RunCMake/FPHSA/range_1-2-exclude.cmake new file mode 100644 index 0000000..0cba368 --- /dev/null +++ b/Tests/RunCMake/FPHSA/range_1-2-exclude.cmake @@ -0,0 +1 @@ +find_package(PseudoRange 1.0...<2.0 REQUIRED) diff --git a/Tests/RunCMake/FPHSA/range_1-2-include.cmake b/Tests/RunCMake/FPHSA/range_1-2-include.cmake new file mode 100644 index 0000000..467267f --- /dev/null +++ b/Tests/RunCMake/FPHSA/range_1-2-include.cmake @@ -0,0 +1 @@ +find_package(PseudoRange 1.0...2.0 REQUIRED) diff --git a/Tests/RunCMake/FPHSA/range_1-3.cmake b/Tests/RunCMake/FPHSA/range_1-3.cmake new file mode 100644 index 0000000..f1506c5 --- /dev/null +++ b/Tests/RunCMake/FPHSA/range_1-3.cmake @@ -0,0 +1 @@ +find_package(PseudoRange 1.0...3.0 REQUIRED) diff --git a/Tests/RunCMake/FPHSA/range_3-4-result.txt b/Tests/RunCMake/FPHSA/range_3-4-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/FPHSA/range_3-4-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/FPHSA/range_3-4-stderr.txt b/Tests/RunCMake/FPHSA/range_3-4-stderr.txt new file mode 100644 index 0000000..8ea19ce --- /dev/null +++ b/Tests/RunCMake/FPHSA/range_3-4-stderr.txt @@ -0,0 +1,2 @@ + Could NOT find PseudoRange: Found unsuitable version "2\.0", required range + is "3.0...4.0" \(found TRUE\) diff --git a/Tests/RunCMake/FPHSA/range_3-4.cmake b/Tests/RunCMake/FPHSA/range_3-4.cmake new file mode 100644 index 0000000..dd19314 --- /dev/null +++ b/Tests/RunCMake/FPHSA/range_3-4.cmake @@ -0,0 +1 @@ +find_package(PseudoRange 3.0...4.0 REQUIRED) diff --git a/Tests/RunCMake/FPHSA/range_ignored-stderr.txt b/Tests/RunCMake/FPHSA/range_ignored-stderr.txt new file mode 100644 index 0000000..43f2336 --- /dev/null +++ b/Tests/RunCMake/FPHSA/range_ignored-stderr.txt @@ -0,0 +1,4 @@ +CMake Warning \(dev\) at .+FindPackageHandleStandardArgs.cmake:[0-9]+ \(message\): + `find_package\(\)` specify a version range but the module Pseudo does not + support this capability. Only the lower endpoint of the range will be + used. diff --git a/Tests/RunCMake/FPHSA/range_ignored.cmake b/Tests/RunCMake/FPHSA/range_ignored.cmake new file mode 100644 index 0000000..ff1ad15 --- /dev/null +++ b/Tests/RunCMake/FPHSA/range_ignored.cmake @@ -0,0 +1 @@ +find_package(Pseudo 1.0...2.0 REQUIRED) diff --git a/Tests/RunCMake/FPHSA/range_no-range.cmake b/Tests/RunCMake/FPHSA/range_no-range.cmake new file mode 100644 index 0000000..24896b1 --- /dev/null +++ b/Tests/RunCMake/FPHSA/range_no-range.cmake @@ -0,0 +1 @@ +find_package(PseudoRange 1.0 REQUIRED) |