diff options
author | Ken Martin <ken.martin@kitware.com> | 2002-06-27 19:57:09 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2002-06-27 19:57:09 (GMT) |
commit | 44a7cd55ff126412d8ba8b82739a1bee132c62a1 (patch) | |
tree | 533de5563331136062407c254c05024bb5b91632 /Source/cmWrapExcludeFilesCommand.cxx | |
parent | a1a05a5fbcd0d34aa5ab0dde7da2ba4c5082916a (diff) | |
download | CMake-44a7cd55ff126412d8ba8b82739a1bee132c62a1.zip CMake-44a7cd55ff126412d8ba8b82739a1bee132c62a1.tar.gz CMake-44a7cd55ff126412d8ba8b82739a1bee132c62a1.tar.bz2 |
removed all source lists from the system and made them vectors. Also appended _CMAKE_PATH to the end of the automatic cache entries for executables and libraries. Odds of all these changes working are slim but cmake builds and passes all its tests. VTK40 starts building
Diffstat (limited to 'Source/cmWrapExcludeFilesCommand.cxx')
-rw-r--r-- | Source/cmWrapExcludeFilesCommand.cxx | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/Source/cmWrapExcludeFilesCommand.cxx b/Source/cmWrapExcludeFilesCommand.cxx index 2bc4e84..90c98c2 100644 --- a/Source/cmWrapExcludeFilesCommand.cxx +++ b/Source/cmWrapExcludeFilesCommand.cxx @@ -33,22 +33,42 @@ bool cmWrapExcludeFilesCommand::InitialPass(std::vector<std::string> const& args return false; } std::vector<std::string> args; - cmSystemTools::ExpandListArguments(argsIn, args); - cmMakefile::SourceMap &Classes = m_Makefile->GetSources(); + m_Makefile->ExpandSourceListArguments(argsIn, args, 0); + for(std::vector<std::string>::const_iterator j = args.begin(); j != args.end(); ++j) { - for(cmMakefile::SourceMap::iterator l = Classes.begin(); - l != Classes.end(); l++) + // if the file is already in the makefile just set properites on it + cmSourceFile* sf = m_Makefile->GetSource(j->c_str()); + if(sf) { - for(std::vector<cmSourceFile*>::iterator i = l->second.begin(); - i != l->second.end(); i++) + sf->SetWrapExclude(true); + } + // if file is not already in the makefile, then add it + else + { + std::string newfile = *j; + cmSourceFile file; + std::string path = cmSystemTools::GetFilenamePath(newfile); + // set the flags + file.SetWrapExclude(true); + // if this is a full path then + if((path.size() && path[0] == '/') || + (path.size() > 1 && path[1] == ':')) { - if((*i)->GetSourceName() == (*j)) - { - (*i)->SetWrapExclude(true); - } + file.SetName(cmSystemTools::GetFilenameName(newfile.c_str()).c_str(), + path.c_str(), + m_Makefile->GetSourceExtensions(), + m_Makefile->GetHeaderExtensions()); } + else + { + file.SetName(newfile.c_str(), m_Makefile->GetCurrentDirectory(), + m_Makefile->GetSourceExtensions(), + m_Makefile->GetHeaderExtensions()); + } + // add the source file to the makefile + m_Makefile->AddSource(file); } } return true; |