diff options
author | Amitha Perera <perera@cs.rpi.edu> | 2002-05-01 20:33:27 (GMT) |
---|---|---|
committer | Amitha Perera <perera@cs.rpi.edu> | 2002-05-01 20:33:27 (GMT) |
commit | 099436db26c0a46b3df4b5aaf51e8777e35bfe06 (patch) | |
tree | cdcbf890cd3e3cc61b9cb398d1a00ee1d53325be /Source/cmMakefile.cxx | |
parent | 36f80fe6c8f7593462c450789b01f4eb37792996 (diff) | |
download | CMake-099436db26c0a46b3df4b5aaf51e8777e35bfe06.zip CMake-099436db26c0a46b3df4b5aaf51e8777e35bfe06.tar.gz CMake-099436db26c0a46b3df4b5aaf51e8777e35bfe06.tar.bz2 |
ENH: Make the LinkLibraries command contribute dependencies towards AddLibraries.
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 ); +} |