cmGhsMultiGpj.cxx 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #include "cmGhsMultiGpj.h"
  4. #include <ostream>
  5. static const char* GHS_TAG[] = { "[INTEGRITY Application]",
  6. "[Library]",
  7. "[Project]",
  8. "[Program]",
  9. "[Reference]",
  10. "[Subproject]",
  11. "[Custom Target]" };
  12. const char* GhsMultiGpj::GetGpjTag(Types gpjType)
  13. {
  14. char const* tag;
  15. switch (gpjType) {
  16. case INTERGRITY_APPLICATION:
  17. case LIBRARY:
  18. case PROJECT:
  19. case PROGRAM:
  20. case REFERENCE:
  21. case SUBPROJECT:
  22. case CUSTOM_TARGET:
  23. tag = GHS_TAG[gpjType];
  24. break;
  25. default:
  26. tag = "";
  27. }
  28. return tag;
  29. }
  30. void GhsMultiGpj::WriteGpjTag(Types gpjType, std::ostream& fout)
  31. {
  32. char const* tag;
  33. tag = GhsMultiGpj::GetGpjTag(gpjType);
  34. fout << tag << std::endl;
  35. }