diff options
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 091bbb4..9280cf2 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1362,3 +1362,26 @@ void cmMakefile::EnableLanguage(const char* lang) { m_MakefileGenerator->EnableLanguage(lang); } + + +void cmMakefile::AddDependencyToCache( std::string target, const std::string& lib ) +{ + // Add the explicit dependency information for this target. This is + // simply a set of libraries separated by ";". There should always + // be a trailing ";". These library names are not canonical, in that + // they may be "-framework x", "-ly", "/path/libz.a", etc. + target += "_LIB_DEPENDS"; + std::string dependencies; + const char* old_val = GetDefinition( target.c_str() ); + if( old_val ) + { + dependencies += old_val; + } + if( dependencies.find( lib ) == std::string::npos ) + { + dependencies += lib; + dependencies += ";"; + } + AddCacheDefinition( target.c_str(), dependencies.c_str(), + "Dependencies for the target", cmCacheManager::INTERNAL ); +} |