summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-09-15 12:41:58 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-09-15 12:42:16 (GMT)
commitead879df2067ccada6cc86ed6248bff850f0f6ec (patch)
treec753ebd8318baa19810fcd4a2e087ec31b7f11af
parent6b76615c4e55dc93fbe6880151a4a24ae700987b (diff)
parent5dc215e03b6a7a421cd024daa8e8747d46b9e60d (diff)
downloadCMake-ead879df2067ccada6cc86ed6248bff850f0f6ec.zip
CMake-ead879df2067ccada6cc86ed6248bff850f0f6ec.tar.gz
CMake-ead879df2067ccada6cc86ed6248bff850f0f6ec.tar.bz2
Merge topic 'fphsa-fix-version-exact'
5dc215e0 FPHSA: fix typo in comment a8f70b32 FPHSA: replace left-over VERSION by _FOUND_VERSION. 549366cb FPHSA: Add (failing) unit test when checking EXACT on full version number Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1259
-rw-r--r--Modules/FindPackageHandleStandardArgs.cmake2
-rw-r--r--Tests/RunCMake/FPHSA/RunCMakeTest.cmake8
2 files changed, 5 insertions, 5 deletions
diff --git a/Modules/FindPackageHandleStandardArgs.cmake b/Modules/FindPackageHandleStandardArgs.cmake
index 7b08bea..67f6bd6 100644
--- a/Modules/FindPackageHandleStandardArgs.cmake
+++ b/Modules/FindPackageHandleStandardArgs.cmake
@@ -322,7 +322,7 @@ function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
endif ()
unset(_VERSION_HEAD)
else ()
- if (NOT ${_NAME}_FIND_VERSION VERSION_EQUAL VERSION)
+ if (NOT ${_NAME}_FIND_VERSION VERSION_EQUAL _FOUND_VERSION)
set(VERSION_MSG "Found unsuitable version \"${_FOUND_VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"")
set(VERSION_OK FALSE)
else ()
diff --git a/Tests/RunCMake/FPHSA/RunCMakeTest.cmake b/Tests/RunCMake/FPHSA/RunCMakeTest.cmake
index 1b71a31..dd73cd4 100644
--- a/Tests/RunCMake/FPHSA/RunCMakeTest.cmake
+++ b/Tests/RunCMake/FPHSA/RunCMakeTest.cmake
@@ -9,13 +9,13 @@ run_cmake(BadFoundVar)
set(RunCMake_TEST_OPTIONS "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" "-DPseudo_VERSION=0")
run_cmake(any_version_find_0)
-# Find a package with more customary version number, without requestion a specific version and in
+# Find a package with more customary version number, without requesting a specific version and in
# the presence of a cache variable VERSION.
-set(RunCMake_TEST_OPTIONS "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" "-DPseudoNoVersionVar_VERSION=1.2.3.4.5_SHOULD_BE_IGNORED" "-DVERSION=BAD_VERSION")
+set(RunCMake_TEST_OPTIONS "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" "-DPseudoNoVersionVar_VERSION=1.2.3.4_SHOULD_BE_IGNORED" "-DVERSION=BAD_VERSION")
run_cmake(any_version_VERSION_cache_variable)
-# Find a package with a more customary version number, without requestion a specific version.
-set(RunCMake_TEST_OPTIONS "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" "-DPseudo_VERSION=1.2.3.4.5")
+# Find a package with a more customary version number, without requesting a specific version.
+set(RunCMake_TEST_OPTIONS "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" "-DPseudo_VERSION=1.2.3.4")
run_cmake(any_version)
# test EXACT mode with every subcomponent