2013-02-22 17:44:13 +04:00
|
|
|
include(RunCMake)
|
|
|
|
|
|
|
|
run_cmake(BadFoundVar)
|
2014-10-03 20:49:00 +04:00
|
|
|
|
|
|
|
# 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
|
2014-10-08 00:46:11 +04:00
|
|
|
run_cmake(exact_0)
|
2014-10-03 20:49:00 +04:00
|
|
|
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)
|
2014-10-08 00:46:11 +04:00
|
|
|
|
|
|
|
# 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)
|