summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWil Stark <wil_stark@keysight.com>2019-06-19 22:11:57 (GMT)
committerWil Stark <wil_stark@keysight.com>2019-06-19 22:11:57 (GMT)
commit7035bdeb523a304e619bf53b3c491287c45521e9 (patch)
treef27f9308f7ea6476e185ccfd7d5593752c32b59d
parent90bd7d0ecf02688afb36257deb35699fd86ca781 (diff)
downloadCMake-7035bdeb523a304e619bf53b3c491287c45521e9.zip
CMake-7035bdeb523a304e619bf53b3c491287c45521e9.tar.gz
CMake-7035bdeb523a304e619bf53b3c491287c45521e9.tar.bz2
VS10Generator: add project properties to enable WindowsCE deployment.
Fixes: #19408
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx5
-rw-r--r--Tests/RunCMake/VS10ProjectWinCE/VsCEDebuggerDeploy-check.cmake17
2 files changed, 22 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 634c990..8b9a41f 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -505,6 +505,11 @@ void cmVisualStudio10TargetGenerator::Generate()
if (targetFrameworkVersion) {
e1.Element("TargetFrameworkVersion", targetFrameworkVersion);
}
+ if (this->ProjectType == vcxproj &&
+ this->GlobalGenerator->TargetsWindowsCE()) {
+ e1.Element("EnableRedirectPlatform", "true");
+ e1.Element("RedirectPlatformValue", this->Platform);
+ }
if (this->ProjectType == csproj &&
this->GlobalGenerator->TargetsWindowsCE()) {
const char* targetFrameworkId = this->GeneratorTarget->GetProperty(
diff --git a/Tests/RunCMake/VS10ProjectWinCE/VsCEDebuggerDeploy-check.cmake b/Tests/RunCMake/VS10ProjectWinCE/VsCEDebuggerDeploy-check.cmake
index dab1c33..b1deb99 100644
--- a/Tests/RunCMake/VS10ProjectWinCE/VsCEDebuggerDeploy-check.cmake
+++ b/Tests/RunCMake/VS10ProjectWinCE/VsCEDebuggerDeploy-check.cmake
@@ -14,6 +14,9 @@ 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)
@@ -23,6 +26,10 @@ foreach(line IN LISTS lines)
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()
@@ -41,6 +48,16 @@ if(NOT FoundToolsVersion4)
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.
#