diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmCustomCommandGenerator.cxx | 9 | ||||
-rw-r--r-- | Source/cmCustomCommandGenerator.h | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmCustomCommandGenerator.cxx b/Source/cmCustomCommandGenerator.cxx index 6c9f9d6..5bbae17 100644 --- a/Source/cmCustomCommandGenerator.cxx +++ b/Source/cmCustomCommandGenerator.cxx @@ -64,6 +64,13 @@ cmCustomCommandGenerator::cmCustomCommandGenerator(cmCustomCommand const& cc, } this->Depends.insert(this->Depends.end(), result.begin(), result.end()); } + + const std::string& workingdirectory = this->CC.GetWorkingDirectory(); + if (!workingdirectory.empty()) { + std::unique_ptr<cmCompiledGeneratorExpression> cge = + this->GE->Parse(workingdirectory); + this->WorkingDirectory = cge->Evaluate(this->LG, this->Config); + } } cmCustomCommandGenerator::~cmCustomCommandGenerator() @@ -186,7 +193,7 @@ const char* cmCustomCommandGenerator::GetComment() const std::string cmCustomCommandGenerator::GetWorkingDirectory() const { - return this->CC.GetWorkingDirectory(); + return this->WorkingDirectory; } std::vector<std::string> const& cmCustomCommandGenerator::GetOutputs() const diff --git a/Source/cmCustomCommandGenerator.h b/Source/cmCustomCommandGenerator.h index 34fd653..b7e2a39 100644 --- a/Source/cmCustomCommandGenerator.h +++ b/Source/cmCustomCommandGenerator.h @@ -23,6 +23,7 @@ class cmCustomCommandGenerator cmGeneratorExpression* GE; cmCustomCommandLines CommandLines; std::vector<std::string> Depends; + std::string WorkingDirectory; const char* GetCrossCompilingEmulator(unsigned int c) const; const char* GetArgv0Location(unsigned int c) const; |