diff options
author | Brad King <brad.king@kitware.com> | 2024-08-28 18:05:00 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-08-28 18:13:05 (GMT) |
commit | 9042aa1af5c1617c913b0ad1f4e0d50014fc2cdf (patch) | |
tree | 6ba42c6c6d7b84637239d0c76bda2fd1b5a7e6f6 | |
parent | 810e33f67a759e56b37b12ca96d5647ba517c431 (diff) | |
download | CMake-9042aa1af5c1617c913b0ad1f4e0d50014fc2cdf.zip CMake-9042aa1af5c1617c913b0ad1f4e0d50014fc2cdf.tar.gz CMake-9042aa1af5c1617c913b0ad1f4e0d50014fc2cdf.tar.bz2 |
Tests: Remove WinCE tests
These work only with the deprecated Visual Studio 12 2013 generator,
which is about to be removed.
-rw-r--r-- | Tests/CMakeLists.txt | 48 | ||||
-rw-r--r-- | Tests/RunCMake/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/RunCMake/VS10ProjectWinCE/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/RunCMake/VS10ProjectWinCE/RunCMakeTest.cmake | 9 | ||||
-rw-r--r-- | Tests/RunCMake/VS10ProjectWinCE/VsCEDebuggerDeploy-check.cmake | 118 | ||||
-rw-r--r-- | Tests/RunCMake/VS10ProjectWinCE/VsCEDebuggerDeploy.cmake | 14 | ||||
-rw-r--r-- | Tests/RunCMake/VS10ProjectWinCE/VsCSharpCFProject-check.cmake | 54 | ||||
-rw-r--r-- | Tests/RunCMake/VS10ProjectWinCE/VsCSharpCFProject.cmake | 8 | ||||
-rw-r--r-- | Tests/RunCMake/VS10ProjectWinCE/foo.cpp | 3 | ||||
-rw-r--r-- | Tests/RunCMake/VS10ProjectWinCE/foo.cs | 3 |
10 files changed, 1 insertions, 262 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 705f71f..deb07ba 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -185,26 +185,6 @@ if(BUILD_TESTING) endif() if(WIN32) - # Macro to search for available Windows CE SDKs in the windows Registry - macro(select_wince_sdk selected_reg selected_sdk) - if(CMAKE_HOST_WIN32) - execute_process(COMMAND reg QUERY "HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows CE Tools\\SDKs" - OUTPUT_VARIABLE sdk_reg - ERROR_VARIABLE my_err) - string(REGEX REPLACE "HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Wow6432Node\\\\Microsoft\\\\Windows CE Tools\\\\SDKs\\\\" ";" sdk_list "${sdk_reg}") - list(LENGTH sdk_list sdk_list_len) - if(${sdk_list_len} GREATER 1) - list(GET sdk_list 1 _sdk) # The first entry is always empty due to the regex replace above - string(STRIP ${_sdk} _sdk) # Make sure there is no newline in the SDK name - endif() - # Build a key to be used by get_filename_component that is pointing to the SDK directory - set(_reg "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows CE Tools\\SDKs\\${_sdk}]") - # Set return values - set(${selected_reg} ${_reg}) - set(${selected_sdk} ${_sdk}) - endif(CMAKE_HOST_WIN32) - endmacro(select_wince_sdk) - set(reg_vs10 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;InstallDir]") set(reg_vs11 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0;InstallDir]") set(reg_vs12 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\12.0;InstallDir]") @@ -214,10 +194,9 @@ if(BUILD_TESTING) set(reg_ws10_0 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\14.0\\Setup\\Build Tools for Windows 10;srcPath]") set(reg_wp80 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\WindowsPhone\\v8.0;InstallationFolder]") set(reg_wp81 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\WindowsPhone\\v8.1;InstallationFolder]") - select_wince_sdk(reg_wince wince_sdk) set(reg_tegra "[HKEY_LOCAL_MACHINE\\SOFTWARE\\NVIDIA Corporation\\Nsight Tegra;sdkRoot]") set(reg_nasm "[HKEY_CURRENT_USER\\SOFTWARE\\nasm]") - foreach(reg IN ITEMS vs10 vs11 vs12 vs14 ws80 ws81 ws10_0 wp80 wp81 wince tegra nasm) + foreach(reg IN ITEMS vs10 vs11 vs12 vs14 ws80 ws81 ws10_0 wp80 wp81 tegra nasm) get_filename_component(r "${reg_${reg}}" ABSOLUTE) if(IS_DIRECTORY "${r}" AND NOT "${r}" STREQUAL "/registry") set(${reg} 1) @@ -2353,31 +2332,6 @@ if(BUILD_TESTING) endif() endif() - if(WIN32 AND wince) - macro(add_test_VSWinCE name generator systemName systemVersion generatorPlatform) - # TODO: Fix the tutorial to make it work in cross compile - # currently the MakeTable is build for target and can not be used on the host - # This happens in part 5 so we build only through part 4 of the tutorial. - foreach(STP RANGE 2 4) - add_test(NAME "TutorialStep${STP}.${name}" COMMAND ${CMAKE_CTEST_COMMAND} - --build-and-test - "${CMake_SOURCE_DIR}/Help/guide/tutorial/Step${STP}" - "${CMake_BINARY_DIR}/Tests/Tutorial/Step${STP}_${name}" - --build-generator "${generator}" - --build-project Tutorial - --build-config $<CONFIGURATION> - --build-options -DCMAKE_SYSTEM_NAME=${systemName} - -DCMAKE_SYSTEM_VERSION=${systemVersion} - -DCMAKE_GENERATOR_PLATFORM=${generatorPlatform}) - list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Tutorial/Step${STP}_${name}") - endforeach() - endmacro() - - if(vs12) - add_test_VSWinCE(vs12-ce80-ARM "Visual Studio 12 2013" WindowsCE 8.0 ${wince_sdk}) - endif() - endif() - if(CMAKE_GENERATOR MATCHES "Visual Studio" AND nasm) ADD_TEST_MACRO(VSNASM VSNASM) endif() diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 65295cc..32996b8 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -778,9 +778,6 @@ if("${CMAKE_GENERATOR}" MATCHES "Visual Studio") -DCMAKE_C_COMPILER_VERSION=${CMAKE_C_COMPILER_VERSION} ) add_RunCMake_test(VS10ProjectUseDebugLibraries) - if( vs12 AND wince ) - add_RunCMake_test( VS10ProjectWinCE "-DRunCMake_GENERATOR_PLATFORM=${wince_sdk}") - endif() endif() if(CMAKE_GENERATOR MATCHES "^Visual Studio (1[6-9]|[2-9][0-9])" diff --git a/Tests/RunCMake/VS10ProjectWinCE/CMakeLists.txt b/Tests/RunCMake/VS10ProjectWinCE/CMakeLists.txt deleted file mode 100644 index 91baae7..0000000 --- a/Tests/RunCMake/VS10ProjectWinCE/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -cmake_minimum_required(VERSION 3.5.0) -project(${RunCMake_TEST} NONE) -include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/VS10ProjectWinCE/RunCMakeTest.cmake b/Tests/RunCMake/VS10ProjectWinCE/RunCMakeTest.cmake deleted file mode 100644 index 2c9067f..0000000 --- a/Tests/RunCMake/VS10ProjectWinCE/RunCMakeTest.cmake +++ /dev/null @@ -1,9 +0,0 @@ -include(RunCMake) - -set(RunCMake_GENERATOR "Visual Studio 12 2013") -set(RunCMake_GENERATOR_TOOLSET CE800) -set(RunCMake_GENERATOR_INSTANCE "") -set(RunCMake_TEST_OPTIONS -DCMAKE_SYSTEM_NAME=WindowsCE ) - -run_cmake(VsCEDebuggerDeploy) -run_cmake(VSCSharpCFProject) diff --git a/Tests/RunCMake/VS10ProjectWinCE/VsCEDebuggerDeploy-check.cmake b/Tests/RunCMake/VS10ProjectWinCE/VsCEDebuggerDeploy-check.cmake deleted file mode 100644 index b1deb99..0000000 --- a/Tests/RunCMake/VS10ProjectWinCE/VsCEDebuggerDeploy-check.cmake +++ /dev/null @@ -1,118 +0,0 @@ -set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/foo.vcxproj") -if(NOT EXISTS "${vcProjectFile}") - set(RunCMake_TEST_FAILED "Project file ${vcProjectFile} does not exist.") - return() -endif() - - -if( NOT ${CMAKE_SYSTEM_NAME} STREQUAL "WindowsCE" ) - set(RunCMake_TEST_FAILED "Test only valid for WindowsCE") - return() -endif() - - -set(FoundCEAdditionalFiles FALSE) -set(FoundRemoteDirectory FALSE) -set(FoundToolsVersion4 FALSE) -set(FoundEnableRedirectPlatform FALSE) -set(FoundRedirectPlatformValue FALSE) - - -file(STRINGS "${vcProjectFile}" lines) -foreach(line IN LISTS lines) - if(line MATCHES "^ *<CEAdditionalFiles> *foo\\.dll\\|\\\\foo\\\\src\\\\dir\\\\on\\\\host\\|\\$\\(RemoteDirectory\\)\\|0;bar\\.dll\\|\\\\bar\\\\src\\\\dir\\|\\$\\(RemoteDirectory\\)bardir\\|0.*</CEAdditionalFiles> *$") - set(FoundCEAdditionalFiles TRUE) - elseif(line MATCHES " *<RemoteDirectory>[A-Za-z0-9\\]+</RemoteDirectory> *$") - set(FoundRemoteDirectory TRUE) - elseif(line MATCHES " *<Project +.*ToolsVersion=\"4.0\".*> *$") - set(FoundToolsVersion4 TRUE) - elseif(line MATCHES "^ *<EnableRedirectPlatform>true</EnableRedirectPlatform> *$") - set(FoundEnableRedirectPlatform TRUE) - elseif(line MATCHES "^ *<RedirectPlatformValue>.+</RedirectPlatformValue> *$") - set(FoundRedirectPlatformValue TRUE) - endif() -endforeach() - -if(NOT FoundCEAdditionalFiles) - set(RunCMake_TEST_FAILED "CEAddionalFiles not found or not set correctly.") - return() -endif() - -if(NOT FoundRemoteDirectory) - set(RunCMake_TEST_FAILED "RemoteDirectory not found or not set correctly.") - return() -endif() - -if(NOT FoundToolsVersion4) - set(RunCMake_TEST_FAILED "Failed to find correct ToolsVersion=\"4.0\" .") - return() -endif() - -if(NOT FoundEnableRedirectPlatform) - set(RunCMake_TEST_FAILED "Failed to find EnableRedirectPlatform true property.") - return() -endif() - -if(NOT FoundRedirectPlatformValue) - set(RunCMake_TEST_FAILED "Failed to find RedirectPlatformValue property.") - return() -endif() - -# -# Test solution file deployment items. -# - -set(vcSlnFile "${RunCMake_TEST_BINARY_DIR}/VsCEDebuggerDeploy.sln") -if(NOT EXISTS "${vcSlnFile}") - set(RunCMake_TEST_FAILED "Solution file ${vcSlnFile} does not exist.") - return() -endif() - - -if( NOT ${CMAKE_SYSTEM_NAME} STREQUAL "WindowsCE" ) - set(RunCMake_TEST_FAILED "Test only valid for WindowsCE") - return() -endif() - - -set(FooProjGUID "") -set(FoundFooProj FALSE) -set(InFooProj FALSE) -set(FoundReleaseDeploy FALSE) -set(DeployConfigs Debug MinSizeRel RelWithDebInfo ) - -file(STRINGS "${vcSlnFile}" lines) -foreach(line IN LISTS lines) -#message(STATUS "${line}") - if( (NOT InFooProj ) AND (line MATCHES "^[ \\t]*Project\\(\"{[A-F0-9-]+}\"\\) = \"foo\", \"foo.vcxproj\", \"({[A-F0-9-]+})\"[ \\t]*$")) - # First, identify the GUID for the foo project, and record it. - set(FoundFooProj TRUE) - set(InFooProj TRUE) - set(FooProjGUID ${CMAKE_MATCH_1}) - elseif(InFooProj AND line MATCHES "EndProject") - set(InFooProj FALSE) - elseif((NOT InFooProj) AND line MATCHES "${FooProjGUID}\\.Release.*\\.Deploy\\.0") - # If foo's Release configuration is set to deploy, this is the error. - set(FoundReleaseDeploy TRUE) - endif() - if( line MATCHES "{[A-F0-9-]+}\\.([^\\|]+).*\\.Deploy\\.0" ) - # Check that the other configurations ARE set to deploy. - list( REMOVE_ITEM DeployConfigs ${CMAKE_MATCH_1}) - endif() -endforeach() - -if(FoundReleaseDeploy) - set(RunCMake_TEST_FAILED "Release deployment not inhibited by VS_NO_SOLUTION_DEPLOY_Release.") - return() -endif() - -if(NOT FoundFooProj) - set(RunCMake_TEST_FAILED "Failed to find foo project in the solution.") - return() -endif() - -list(LENGTH DeployConfigs length) -if( length GREATER 0 ) - set(RunCMake_TEST_FAILED "Failed to find Deploy lines for non-Release configurations. (${length})") - return() -endif() diff --git a/Tests/RunCMake/VS10ProjectWinCE/VsCEDebuggerDeploy.cmake b/Tests/RunCMake/VS10ProjectWinCE/VsCEDebuggerDeploy.cmake deleted file mode 100644 index 611db0a..0000000 --- a/Tests/RunCMake/VS10ProjectWinCE/VsCEDebuggerDeploy.cmake +++ /dev/null @@ -1,14 +0,0 @@ -enable_language(CXX) - -set(DEPLOY_DIR - "temp\\foodir" -) - -add_library(foo SHARED foo.cpp) - -set_target_properties(foo - PROPERTIES - DEPLOYMENT_ADDITIONAL_FILES "foo.dll|\\foo\\src\\dir\\on\\host|$(RemoteDirectory)|0;bar.dll|\\bar\\src\\dir|$(RemoteDirectory)bardir|0" - DEPLOYMENT_REMOTE_DIRECTORY ${DEPLOY_DIR} - VS_NO_SOLUTION_DEPLOY $<CONFIG:Release> -) diff --git a/Tests/RunCMake/VS10ProjectWinCE/VsCSharpCFProject-check.cmake b/Tests/RunCMake/VS10ProjectWinCE/VsCSharpCFProject-check.cmake deleted file mode 100644 index 618896e..0000000 --- a/Tests/RunCMake/VS10ProjectWinCE/VsCSharpCFProject-check.cmake +++ /dev/null @@ -1,54 +0,0 @@ -# -# Check C# Compact Framework project for required elements. -# -set(csProjectFile "${RunCMake_TEST_BINARY_DIR}/foo.csproj") -if(NOT EXISTS "${csProjectFile}") - set(RunCMake_TEST_FAILED "Project file ${csProjectFile} does not exist.") - return() -endif() - -if( NOT ${CMAKE_SYSTEM_NAME} STREQUAL "WindowsCE" ) - set(RunCMake_TEST_FAILED "Test only valid for WindowsCE") - return() -endif() - -set(FoundTargetFrameworkTargetsVersion FALSE) -set(FoundDotNetFrameworkVersion FALSE) -set(FoundTargetFrameworkIdentifier FALSE) -set(FoundCFTargetsImport FALSE) - - -file(STRINGS "${csProjectFile}" lines) -foreach(line IN LISTS lines) - #message(STATUS ${line}) - if(line MATCHES "^ *<TargetFrameworkIdentifier>WindowsEmbeddedCompact</TargetFrameworkIdentifier> *$") - set(FoundTargetFrameworkIdentifier TRUE) - elseif(line MATCHES " *<TargetFrameworkVersion>v3.9</TargetFrameworkVersion> *$") - set(FoundDotNetFrameworkVersion TRUE) - elseif(line MATCHES " *<TargetFrameworkTargetsVersion>v8.0</TargetFrameworkTargetsVersion> *$") - set(FoundTargetFrameworkTargetsVersion TRUE) - elseif( line MATCHES " *<Import Project=\"\\$\\(MSBuildExtensionsPath\\)\\\\Microsoft\\\\\\$\\(TargetFrameworkIdentifier\\)\\\\\\$\\(TargetFrameworkTargetsVersion\\)\\\\Microsoft\\.\\$\\(TargetFrameworkIdentifier\\)\\.CSharp\\.targets\" */> *" ) - set(FoundCFTargetsImport TRUE) - endif() -endforeach() - - -if(NOT FoundTargetFrameworkTargetsVersion) - set(RunCMake_TEST_FAILED "TargetFrameworkIdentifier not found or not set correctly.") - return() -endif() - -if(NOT FoundDotNetFrameworkVersion) - set(RunCMake_TEST_FAILED "TargetFrameworkVersion not found or not set correctly.") - return() -endif() - -if(NOT FoundTargetFrameworkIdentifier) - set(RunCMake_TEST_FAILED "TargetFrameworkTargetsVersion not found or not set correctly.") - return() -endif() - -if(NOT FoundCFTargetsImport) - set(RunCMake_TEST_FAILED "Import of Compact Framework targets file not found or not set correctly.") - return() -endif() diff --git a/Tests/RunCMake/VS10ProjectWinCE/VsCSharpCFProject.cmake b/Tests/RunCMake/VS10ProjectWinCE/VsCSharpCFProject.cmake deleted file mode 100644 index fb2acbb..0000000 --- a/Tests/RunCMake/VS10ProjectWinCE/VsCSharpCFProject.cmake +++ /dev/null @@ -1,8 +0,0 @@ -enable_language(CSharp) - -add_library(foo SHARED foo.cs ) - -set_target_properties(foo - PROPERTIES - DOTNET_TARGET_FRAMEWORK_VERSION "v3.9" -) diff --git a/Tests/RunCMake/VS10ProjectWinCE/foo.cpp b/Tests/RunCMake/VS10ProjectWinCE/foo.cpp deleted file mode 100644 index 3695dc9..0000000 --- a/Tests/RunCMake/VS10ProjectWinCE/foo.cpp +++ /dev/null @@ -1,3 +0,0 @@ -void foo() -{ -} diff --git a/Tests/RunCMake/VS10ProjectWinCE/foo.cs b/Tests/RunCMake/VS10ProjectWinCE/foo.cs deleted file mode 100644 index 3695dc9..0000000 --- a/Tests/RunCMake/VS10ProjectWinCE/foo.cs +++ /dev/null @@ -1,3 +0,0 @@ -void foo() -{ -} |