cmSourceFilesCommand.cxx 959 B

123456789101112131415161718192021222324252627282930313233343536
  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 "cmSourceFilesCommand.h"
  12. // cmSourceFilesCommand
  13. bool cmSourceFilesCommand::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. for(std::vector<std::string>::iterator i = (args.begin() + 1);
  21. i != args.end(); ++i)
  22. {
  23. cmSourceFile file;
  24. file.SetIsAnAbstractClass(false);
  25. file.SetName((*i).c_str(), m_Makefile->GetCurrentDirectory());
  26. m_Makefile->AddSource(file, args[0].c_str());
  27. }
  28. return true;
  29. }