diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 18 | ||||
-rw-r--r-- | Source/cmGlobalGenerator.h | 2 |
2 files changed, 16 insertions, 4 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index a8455db..a798200 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1343,9 +1343,7 @@ cmLocalGenerator *cmGlobalGenerator::CreateLocalGenerator() void cmGlobalGenerator::EnableLanguagesFromGenerator(cmGlobalGenerator *gen ) { - std::string cfp = gen->GetCMakeInstance()->GetHomeOutputDirectory(); - cfp += cmake::GetCMakeFilesDirectory(); - this->SetConfiguredFilesPath(cfp.c_str()); + this->SetConfiguredFilesPath(gen); const char* make = gen->GetCMakeInstance()->GetCacheDefinition("CMAKE_MAKE_PROGRAM"); this->GetCMakeInstance()->AddCacheEntry("CMAKE_MAKE_PROGRAM", make, @@ -1361,6 +1359,20 @@ void cmGlobalGenerator::EnableLanguagesFromGenerator(cmGlobalGenerator *gen ) } //---------------------------------------------------------------------------- +void cmGlobalGenerator::SetConfiguredFilesPath(cmGlobalGenerator* gen) +{ + if(!gen->ConfiguredFilesPath.empty()) + { + this->ConfiguredFilesPath = gen->ConfiguredFilesPath; + } + else + { + this->ConfiguredFilesPath = gen->CMakeInstance->GetHomeOutputDirectory(); + this->ConfiguredFilesPath += cmake::GetCMakeFilesDirectory(); + } +} + +//---------------------------------------------------------------------------- void cmGlobalGenerator::GetDocumentation(cmDocumentationEntry& entry) const { entry.Name = this->GetName(); diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 914e1da..4b60778 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -123,7 +123,7 @@ public: ///! Get the CMake instance cmake *GetCMakeInstance() { return this->CMakeInstance; }; - void SetConfiguredFilesPath(const char* s){this->ConfiguredFilesPath = s;} + void SetConfiguredFilesPath(cmGlobalGenerator* gen); const std::vector<cmLocalGenerator *>& GetLocalGenerators() const { return this->LocalGenerators;} |