Skip to content
Snippets Groups Projects
Commit ec6dd770 authored by Brad King's avatar Brad King
Browse files

Tests: Remove redundant condition in RunCMake.GeneratorPlatform test

parent 4776a584
No related branches found
No related tags found
No related merge requests found
......@@ -83,29 +83,27 @@ if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio (1[4567])( 20[0-9][0-9])?$")
message(FATAL_ERROR "Could not find any Windows SDKs to drive test cases.")
endif()
if(kits)
foreach(expect_version IN LISTS kits)
set(RunCMake_GENERATOR_PLATFORM "version=${expect_version}")
set(RunCMake_TEST_VARIANT_DESCRIPTION "-${expect_version}")
run_cmake_with_options(VersionExists -DCMAKE_SYSTEM_VERSION=10.0)
unset(RunCMake_GENERATOR_PLATFORM)
endforeach()
foreach(expect_version IN LISTS kits)
set(RunCMake_TEST_VARIANT_DESCRIPTION "-CMP0149-OLD-${expect_version}")
run_cmake_with_options(VersionExists -DCMAKE_SYSTEM_VERSION=${expect_version} -DCMAKE_POLICY_DEFAULT_CMP0149=OLD)
endforeach()
if(kits MATCHES "(^|;)([0-9.]+)$")
set(expect_version "${CMAKE_MATCH_2}")
foreach(test_version IN LISTS kits)
set(RunCMake_TEST_VARIANT_DESCRIPTION "-CMP0149-NEW-${test_version}")
run_cmake_with_options(VersionExists -DCMAKE_SYSTEM_VERSION=${test_version} -DCMAKE_POLICY_DEFAULT_CMP0149=NEW)
endforeach()
endif()
foreach(expect_version IN LISTS kits)
set(RunCMake_TEST_VARIANT_DESCRIPTION "-WindowsSDKVersion-${expect_version}")
set(ENV{WindowsSDKVersion} "${expect_version}\\")
run_cmake_with_options(VersionExists -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_POLICY_DEFAULT_CMP0149=NEW)
unset(ENV{WindowsSDKVersion})
foreach(expect_version IN LISTS kits)
set(RunCMake_GENERATOR_PLATFORM "version=${expect_version}")
set(RunCMake_TEST_VARIANT_DESCRIPTION "-${expect_version}")
run_cmake_with_options(VersionExists -DCMAKE_SYSTEM_VERSION=10.0)
unset(RunCMake_GENERATOR_PLATFORM)
endforeach()
foreach(expect_version IN LISTS kits)
set(RunCMake_TEST_VARIANT_DESCRIPTION "-CMP0149-OLD-${expect_version}")
run_cmake_with_options(VersionExists -DCMAKE_SYSTEM_VERSION=${expect_version} -DCMAKE_POLICY_DEFAULT_CMP0149=OLD)
endforeach()
if(kits MATCHES "(^|;)([0-9.]+)$")
set(expect_version "${CMAKE_MATCH_2}")
foreach(test_version IN LISTS kits)
set(RunCMake_TEST_VARIANT_DESCRIPTION "-CMP0149-NEW-${test_version}")
run_cmake_with_options(VersionExists -DCMAKE_SYSTEM_VERSION=${test_version} -DCMAKE_POLICY_DEFAULT_CMP0149=NEW)
endforeach()
endif()
foreach(expect_version IN LISTS kits)
set(RunCMake_TEST_VARIANT_DESCRIPTION "-WindowsSDKVersion-${expect_version}")
set(ENV{WindowsSDKVersion} "${expect_version}\\")
run_cmake_with_options(VersionExists -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_POLICY_DEFAULT_CMP0149=NEW)
unset(ENV{WindowsSDKVersion})
endforeach()
endif()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment