diff options
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 4c31efa..55acc50 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -665,7 +665,16 @@ void cmMakefile::AddLibrary(const char* lname, int shared, default: target.SetType(cmTarget::STATIC_LIBRARY); } + // Clear its dependencies. Otherwise, dependencies might persist + // over changes in CMakeLists.txt, making the information stale and + // hence useless. + std::string depname = lname; + depname += "_LIB_DEPENDS"; + cmCacheManager::GetInstance()-> + AddCacheEntry(depname.c_str(), "", + "Dependencies for target", cmCacheManager::INTERNAL); + target.SetInAll(true); target.GetSourceLists() = srcs; std::vector<std::string>::iterator j; @@ -723,14 +732,6 @@ void cmMakefile::AddLibrary(const char* lname, int shared, cmCacheManager::INTERNAL); } - // Clear its dependencies. Otherwise, dependencies might persist - // over changes in CMakeLists.txt, making the information stale and - // hence useless. - std::string depname = lname; - depname += "_LIB_DEPENDS"; - cmCacheManager::GetInstance()-> - AddCacheEntry(depname.c_str(), "", - "Dependencies for target", cmCacheManager::INTERNAL); } void cmMakefile::AddExecutable(const char *exeName, |