diff options
author | Brad King <brad.king@kitware.com> | 2006-08-31 18:09:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2006-08-31 18:09:56 (GMT) |
commit | 409f70bc910f5068e090a4598bdeb44af6361ba4 (patch) | |
tree | 99b335d063d623db6c9be23b55b926f7155f7c76 /Source/cmLocalUnixMakefileGenerator3.cxx | |
parent | f12742d6cdffd62378a4bbf8eeff0c552d2d9093 (diff) | |
download | CMake-409f70bc910f5068e090a4598bdeb44af6361ba4.zip CMake-409f70bc910f5068e090a4598bdeb44af6361ba4.tar.gz CMake-409f70bc910f5068e090a4598bdeb44af6361ba4.tar.bz2 |
ENH: Make sure all custom command outputs are up to date before scanning dependencies. This avoids the need to pass a list of generated files to the dependency scanning code and to rescan after the files have been generated. Currently there is no notion of implicit dependencies of the custom commands themselves so this design is safe. We only need to make sure implicit dependencies are up to date before the make process for the /build part of a target is executed because only this process loads them. This is a step towards fixing bug#3658.
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 46 |
1 files changed, 1 insertions, 45 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index dd706a4..6be42b4 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -477,8 +477,6 @@ void cmLocalUnixMakefileGenerator3::WriteDirectoryInformationFile() for(std::vector<std::string>::iterator i = includeDirs.begin(); i != includeDirs.end(); ++i) { - // Note: This path conversion must match that used for - // CMAKE_GENERATED_FILES so that the file names match. infoFileStream << " \"" << this->Convert(i->c_str(),HOME_OUTPUT).c_str() << "\"\n"; } @@ -509,30 +507,6 @@ void cmLocalUnixMakefileGenerator3::WriteDirectoryInformationFile() infoFileStream << "SET(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN " "${CMAKE_C_INCLUDE_REGEX_COMPLAIN})\n"; - - // Store the set of available generated files. - infoFileStream - << "\n" - << "# The set of files generated by rules in this directory:\n"; - infoFileStream - << "SET(CMAKE_GENERATED_FILES\n"; - for(std::vector<cmSourceFile*>::const_iterator - i = this->Makefile->GetSourceFiles().begin(); - i != this->Makefile->GetSourceFiles().end(); ++i) - { - cmSourceFile* src = *i; - if(src->GetPropertyAsBool("GENERATED")) - { - // Note: This path conversion must match that used for - // CMAKE_C_INCLUDE_PATH so that the file names match. - infoFileStream - << " \"" - << this->Convert(src->GetFullPath().c_str(), HOME_OUTPUT) - << "\"\n"; - } - } - infoFileStream - << ")\n"; } //---------------------------------------------------------------------------- @@ -1292,24 +1266,6 @@ bool cmLocalUnixMakefileGenerator3::ScanDependencies(const char* tgtInfo) this->WriteDisclaimer(ruleFileStream); this->WriteDisclaimer(internalRuleFileStream); - // Get the set of generated files. - std::vector<std::string> generatedFilesVec; - if(haveDirectoryInfo) - { - if(const char* generated = mf->GetDefinition("CMAKE_GENERATED_FILES")) - { - cmSystemTools::ExpandListArgument(generated, generatedFilesVec); - } - } - - // Sort for efficient lookup. - std::set<cmStdString> generatedFiles; - for(std::vector<std::string>::iterator gfi = generatedFilesVec.begin(); - gfi != generatedFilesVec.end(); ++gfi) - { - generatedFiles.insert(*gfi); - } - // for each language we need to scan, scan it const char *langStr = mf->GetSafeDefinition("CMAKE_DEPENDS_LANGUAGES"); std::vector<std::string> langs; @@ -1367,7 +1323,7 @@ bool cmLocalUnixMakefileGenerator3::ScanDependencies(const char* tgtInfo) scanner = new cmDependsC(includes, includeRegexScan.c_str(), includeRegexComplain.c_str(), - generatedFiles, includeCacheFileName); + includeCacheFileName); scanner->SetLocalGenerator(this); } #ifdef CMAKE_BUILD_WITH_CMAKE |