cmWrapExcludeFilesCommand.cxx 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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& args)
  16. {
  17. if(args.size() < 1 )
  18. {
  19. this->SetError("called with incorrect number of arguments");
  20. return false;
  21. }
  22. cmMakefile::SourceMap &Classes = m_Makefile->GetSources();
  23. for(std::vector<std::string>::const_iterator j = args.begin();
  24. j != args.end(); ++j)
  25. {
  26. for(cmMakefile::SourceMap::iterator l = Classes.begin();
  27. l != Classes.end(); l++)
  28. {
  29. for(std::vector<cmSourceFile>::iterator i = l->second.begin();
  30. i != l->second.end(); i++)
  31. {
  32. if(i->GetSourceName() == (*j))
  33. {
  34. i->SetWrapExclude(true);
  35. }
  36. }
  37. }
  38. }
  39. return true;
  40. }