cmWrapExcludeFilesCommand.cxx 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*=========================================================================
  2. Program: Insight Segmentation & Registration Toolkit
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Insight Consortium. All rights reserved.
  8. See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #include "cmWrapExcludeFilesCommand.h"
  14. // cmWrapExcludeFilesCommand
  15. bool cmWrapExcludeFilesCommand::InitialPass(std::vector<std::string> const& argsIn)
  16. {
  17. if(argsIn.size() < 1 )
  18. {
  19. this->SetError("called with incorrect number of arguments");
  20. return false;
  21. }
  22. std::vector<std::string> args;
  23. cmSystemTools::ExpandListArguments(argsIn, args);
  24. cmMakefile::SourceMap &Classes = m_Makefile->GetSources();
  25. for(std::vector<std::string>::const_iterator j = args.begin();
  26. j != args.end(); ++j)
  27. {
  28. for(cmMakefile::SourceMap::iterator l = Classes.begin();
  29. l != Classes.end(); l++)
  30. {
  31. for(std::vector<cmSourceFile*>::iterator i = l->second.begin();
  32. i != l->second.end(); i++)
  33. {
  34. if((*i)->GetSourceName() == (*j))
  35. {
  36. (*i)->SetWrapExclude(true);
  37. }
  38. }
  39. }
  40. }
  41. return true;
  42. }