diff options
author | Jon Chronopoulos <patches@crondog.com> | 2018-06-17 07:55:27 (GMT) |
---|---|---|
committer | Jon Chronopoulos <patches@crondog.com> | 2018-06-17 07:55:27 (GMT) |
commit | 797de7a6f61a0155429cf2a7f4866fbc4a72c90c (patch) | |
tree | 60fba4ebba6a65525f7714470122a55cbf56f7ec /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | 55c3435ce9faae76574341df2590016be592badc (diff) | |
download | CMake-797de7a6f61a0155429cf2a7f4866fbc4a72c90c.zip CMake-797de7a6f61a0155429cf2a7f4866fbc4a72c90c.tar.gz CMake-797de7a6f61a0155429cf2a7f4866fbc4a72c90c.tar.bz2 |
VS10Project: Expand VS_DEBUGGER_* capabilities
This adds VS_DEBUGGER_COMMAND_ARGUMENTS and VS_DEBUGGER_ENVIRONMENT as
well as allowing VS_DEBUGGER_* to use generator expressions.
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 41 |
1 files changed, 39 insertions, 2 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 549c8af..92dd5d6 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2286,14 +2286,51 @@ void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions( if (const char* workingDir = this->GeneratorTarget->GetProperty( "VS_DEBUGGER_WORKING_DIRECTORY")) { + cmGeneratorExpression ge; + std::unique_ptr<cmCompiledGeneratorExpression> cge = + ge.Parse(workingDir); + std::string genWorkingDir = + cge->Evaluate(this->LocalGenerator, config); + e1.WritePlatformConfigTag("LocalDebuggerWorkingDirectory", cond, - workingDir); + genWorkingDir); + } + + if (const char* environment = + this->GeneratorTarget->GetProperty("VS_DEBUGGER_ENVIRONMENT")) { + cmGeneratorExpression ge; + std::unique_ptr<cmCompiledGeneratorExpression> cge = + ge.Parse(environment); + std::string genEnvironment = + cge->Evaluate(this->LocalGenerator, config); + + e1.WritePlatformConfigTag("LocalDebuggerEnvironment", cond, + genEnvironment); } if (const char* debuggerCommand = this->GeneratorTarget->GetProperty("VS_DEBUGGER_COMMAND")) { + + cmGeneratorExpression ge; + std::unique_ptr<cmCompiledGeneratorExpression> cge = + ge.Parse(debuggerCommand); + std::string genDebuggerCommand = + cge->Evaluate(this->LocalGenerator, config); + e1.WritePlatformConfigTag("LocalDebuggerCommand", cond, - debuggerCommand); + genDebuggerCommand); + } + + if (const char* commandArguments = this->GeneratorTarget->GetProperty( + "VS_DEBUGGER_COMMAND_ARGUMENTS")) { + cmGeneratorExpression ge; + std::unique_ptr<cmCompiledGeneratorExpression> cge = + ge.Parse(commandArguments); + std::string genCommandArguments = + cge->Evaluate(this->LocalGenerator, config); + + e1.WritePlatformConfigTag("LocalDebuggerCommandArguments", cond, + genCommandArguments); } std::string name = |