Skip to content
Snippets Groups Projects
Commit 0019bfeb authored by Yves Frederix's avatar Yves Frederix
Browse files

FPHSA: Add (failing) unit test in case a cache variable VERSION is present

parent 81844334
No related branches found
No related tags found
No related merge requests found
# pseudo find_module without specifying VERSION_VAR
set(FOOBAR TRUE)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PseudoNoVersionVar REQUIRED_VARS FOOBAR)
......@@ -9,7 +9,12 @@ 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 a more customary version number.
# Find a package with more customary version number, without requestion 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")
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")
run_cmake(any_version)
......
Found PseudoNoVersionVar: TRUE *
+
find_package(PseudoNoVersionVar REQUIRED)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment