Merge topic 'vs-remote-directory'

a22f9967 VS: Optionally generate remote directory for WinCE projects
This commit is contained in:
Brad King 2016-03-16 09:08:01 -04:00 committed by CMake Topic Stage
commit f5eda70690
5 changed files with 55 additions and 0 deletions

View File

@ -141,6 +141,7 @@ Properties on Targets
/prop_tgt/CXX_STANDARD_REQUIRED /prop_tgt/CXX_STANDARD_REQUIRED
/prop_tgt/DEBUG_POSTFIX /prop_tgt/DEBUG_POSTFIX
/prop_tgt/DEFINE_SYMBOL /prop_tgt/DEFINE_SYMBOL
/prop_tgt/DEPLOYMENT_REMOTE_DIRECTORY
/prop_tgt/EchoString /prop_tgt/EchoString
/prop_tgt/ENABLE_EXPORTS /prop_tgt/ENABLE_EXPORTS
/prop_tgt/EXCLUDE_FROM_ALL /prop_tgt/EXCLUDE_FROM_ALL

View File

@ -0,0 +1,18 @@
DEPLOYMENT_REMOTE_DIRECTORY
---------------------------
Set the WinCE project ``RemoteDirectory`` in ``DeploymentTool`` and
``RemoteExecutable`` in ``DebuggerTool`` in ``.vcproj`` files generated
by the :generator:`Visual Studio 9 2008` and :generator:`Visual Studio 8 2005`
generators. This is useful when you want to debug on remote WinCE device.
For example:
.. code-block:: cmake
set_property(TARGET ${TARGET} PROPERTY
DEPLOYMENT_REMOTE_DIRECTORY "\\FlashStorage")
produces::
<DeploymentTool RemoteDirectory="\FlashStorage" ... />
<DebuggerTool RemoteExecutable="\FlashStorage\target_file" ... />

View File

@ -0,0 +1,7 @@
vs-remote-directory
-------------------
* The :generator:`Visual Studio 9 2008` and :generator:`Visual Studio 8 2005`
generators learned to generate the remote directory for WinCE project
deployment and debugger settings. See the
:prop_tgt:`DEPLOYMENT_REMOTE_DIRECTORY` target property.

View File

@ -1012,6 +1012,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
this->OutputTargetRules(fout, configName, target, libName); this->OutputTargetRules(fout, configName, target, libName);
this->OutputBuildTool(fout, configName, target, targetOptions); this->OutputBuildTool(fout, configName, target, targetOptions);
this->OutputDeploymentDebuggerTool(fout, configName, target);
fout << "\t\t</Configuration>\n"; fout << "\t\t</Configuration>\n";
} }
@ -1374,6 +1375,31 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
} }
} }
void cmLocalVisualStudio7Generator::OutputDeploymentDebuggerTool(
std::ostream& fout, std::string const& config, cmGeneratorTarget* target)
{
if (this->WindowsCEProject)
{
if (const char* dir = target->GetProperty("DEPLOYMENT_REMOTE_DIRECTORY"))
{
fout <<
"\t\t\t<DeploymentTool\n"
"\t\t\t\tForceDirty=\"-1\"\n"
"\t\t\t\tRemoteDirectory=\"" << this->EscapeForXML(dir) << "\"\n"
"\t\t\t\tRegisterOutput=\"0\"\n"
"\t\t\t\tAdditionalFiles=\"\"/>\n"
;
std::string const exe = dir + std::string("\\") + target->GetFullName();
fout <<
"\t\t\t<DebuggerTool\n"
"\t\t\t\tRemoteExecutable=\"" << this->EscapeForXML(exe) << "\"\n"
"\t\t\t\tArguments=\"\"\n"
"\t\t\t/>\n"
;
}
}
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void void
cmLocalVisualStudio7Generator cmLocalVisualStudio7Generator

View File

@ -92,6 +92,9 @@ private:
const std::string& libName); const std::string& libName);
void OutputBuildTool(std::ostream& fout, const std::string& configName, void OutputBuildTool(std::ostream& fout, const std::string& configName,
cmGeneratorTarget* t, const Options& targetOptions); cmGeneratorTarget* t, const Options& targetOptions);
void OutputDeploymentDebuggerTool(std::ostream& fout,
std::string const& config,
cmGeneratorTarget* target);
void OutputLibraryDirectories(std::ostream& fout, void OutputLibraryDirectories(std::ostream& fout,
std::vector<std::string> const& dirs); std::vector<std::string> const& dirs);
void WriteProjectSCC(std::ostream& fout, cmGeneratorTarget *target); void WriteProjectSCC(std::ostream& fout, cmGeneratorTarget *target);