cmTarget.cxx 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 "cmTarget.h"
  12. #include "cmMakefile.h"
  13. void cmTarget::GenerateSourceFilesFromSourceLists(const cmMakefile &mf)
  14. {
  15. // for each src lists add the classes
  16. for (std::vector<std::string>::const_iterator s = m_SourceLists.begin();
  17. s != m_SourceLists.end(); ++s)
  18. {
  19. // replace any variables
  20. std::string temps = *s;
  21. mf.ExpandVariablesInString(temps);
  22. // look for a srclist
  23. if (mf.GetSources().find(temps) != mf.GetSources().end())
  24. {
  25. const std::vector<cmSourceFile> &clsList =
  26. mf.GetSources().find(temps)->second;
  27. m_SourceFiles.insert(m_SourceFiles.end(), clsList.begin(), clsList.end());
  28. }
  29. // if one wasn't found then assume it is a single class
  30. else
  31. {
  32. cmSourceFile file;
  33. file.SetIsAnAbstractClass(false);
  34. file.SetName(temps.c_str(), mf.GetCurrentDirectory());
  35. m_SourceFiles.push_back(file);
  36. }
  37. }
  38. }