cmWrapExcludeFilesCommand.cxx 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*=========================================================================
  2. Program: Insight Segmentation & Registration Toolkit
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2000 National Library of Medicine
  8. All rights reserved.
  9. See COPYRIGHT.txt for copyright details.
  10. =========================================================================*/
  11. #include "cmWrapExcludeFilesCommand.h"
  12. // cmWrapExcludeFilesCommand
  13. bool cmWrapExcludeFilesCommand::Invoke(std::vector<std::string>& args)
  14. {
  15. if(args.size() < 1 )
  16. {
  17. this->SetError("called with incorrect number of arguments");
  18. return false;
  19. }
  20. cmMakefile::SourceMap &Classes = m_Makefile->GetSources();
  21. for(std::vector<std::string>::iterator j = args.begin();
  22. j != args.end(); ++j)
  23. {
  24. for(cmMakefile::SourceMap::iterator l = Classes.begin();
  25. l != Classes.end(); l++)
  26. {
  27. for(std::vector<cmSourceFile>::iterator i = l->second.begin();
  28. i != l->second.end(); i++)
  29. {
  30. if(i->GetSourceName() == (*j))
  31. {
  32. i->SetWrapExclude(true);
  33. }
  34. }
  35. }
  36. }
  37. return true;
  38. }