diff options
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 05ba04d..ec78daf 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -52,6 +52,7 @@ cmLocalGenerator::cmLocalGenerator() this->UseRelativePaths = false; this->Configured = false; this->EmitUniversalBinaryFlags = true; + this->IsMakefileGenerator = false; this->RelativePathsConfigured = false; this->PathConversionsSetup = false; } @@ -135,6 +136,30 @@ void cmLocalGenerator::ConfigureFinalPass() this->Makefile->ConfigureFinalPass(); } +void cmLocalGenerator::TraceDependencies() +{ + // Generate the rule files for each target. + cmTargets& targets = this->Makefile->GetTargets(); + for(cmTargets::iterator t = targets.begin(); t != targets.end(); ++t) + { + // INCLUDE_EXTERNAL_MSPROJECT command only affects the workspace + // so don't build a projectfile for it + if ((t->second.GetType() != cmTarget::INSTALL_FILES) + && (t->second.GetType() != cmTarget::INSTALL_PROGRAMS) + && (t->second.GetType() != cmTarget::INSTALL_DIRECTORY) + && (strncmp(t->first.c_str(), "INCLUDE_EXTERNAL_MSPROJECT", 26) != 0) + && (t->second.GetPropertyAsBool("IMPORTED") == false)) + { + std::string projectFilename; + if (this->IsMakefileGenerator == false) // only use of this variable + { + projectFilename=t->second.GetName(); + } + t->second.TraceVSDependencies(projectFilename, this->Makefile); + } + } +} + void cmLocalGenerator::GenerateTestFiles() { if ( !this->Makefile->IsOn("CMAKE_TESTING_ENABLED") ) @@ -1987,6 +2012,20 @@ std::string cmLocalGenerator::GetRealDependency(const char* inName, } //---------------------------------------------------------------------------- +std::string cmLocalGenerator::GetRealLocation(const char* inName, + const char* config) +{ + std::string outName=inName; + // Look for a CMake target with the given name. + cmTarget* target = this->GlobalGenerator->FindTarget(0, inName); + if ((target!=0) && (target->GetType()==cmTarget::EXECUTABLE)) + { + outName = target->GetLocation( config ); + } + return outName; +} + +//---------------------------------------------------------------------------- void cmLocalGenerator::AddSharedFlags(std::string& flags, const char* lang, bool shared) |