cmTarget.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. #ifndef cmTarget_h
  12. #define cmTarget_h
  13. #include "cmStandardIncludes.h"
  14. #include "cmCustomCommand.h"
  15. #include "cmSourceFile.h"
  16. /** \class cmTarget
  17. * \brief Represent a library or executable target loaded from a makefile.
  18. *
  19. * cmTarget represents a target loaded from
  20. * a makefile.
  21. */
  22. class cmTarget
  23. {
  24. public:
  25. /**
  26. * is this target a library?
  27. */
  28. bool IsALibrary() const { return m_IsALibrary; }
  29. bool GetIsALibrary() const { return m_IsALibrary; }
  30. void SetIsALibrary(bool f) { m_IsALibrary = f; }
  31. /**
  32. * Get the list of the custom commands for this target
  33. */
  34. const std::vector<cmCustomCommand> &GetCustomCommands() const {return m_CustomCommands;}
  35. std::vector<cmCustomCommand> &GetCustomCommands() {return m_CustomCommands;}
  36. /**
  37. * Get the list of the source lists used by this target
  38. */
  39. const std::vector<std::string> &GetSourceLists() const
  40. {return m_SourceLists;}
  41. std::vector<std::string> &GetSourceLists() {return m_SourceLists;}
  42. /**
  43. * Get the list of the source files used by this target
  44. */
  45. const std::vector<cmSourceFile> &GetSourceFiles() const
  46. {return m_SourceFiles;}
  47. std::vector<cmSourceFile> &GetSourceFiles() {return m_SourceFiles;}
  48. /**
  49. * Generate the SourceFilesList from the SourceLists. This should only be
  50. * done once to be safe.
  51. */
  52. void GenerateSourceFilesFromSourceLists(const cmMakefile &mf);
  53. private:
  54. std::vector<cmCustomCommand> m_CustomCommands;
  55. std::vector<std::string> m_SourceLists;
  56. bool m_IsALibrary;
  57. std::vector<cmSourceFile> m_SourceFiles;
  58. };
  59. typedef std::map<std::string,cmTarget> cmTargets;
  60. #endif