cmLocalGhsMultiGenerator.cxx 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2015 Geoffrey Viola <[email protected]>
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #include "cmLocalGhsMultiGenerator.h"
  11. #include "cmGlobalGhsMultiGenerator.h"
  12. #include "cmGeneratorTarget.h"
  13. #include "cmMakefile.h"
  14. #include "cmGhsMultiTargetGenerator.h"
  15. #include "cmGeneratedFileStream.h"
  16. cmLocalGhsMultiGenerator::cmLocalGhsMultiGenerator()
  17. {
  18. }
  19. cmLocalGhsMultiGenerator::~cmLocalGhsMultiGenerator() {}
  20. void cmLocalGhsMultiGenerator::Generate()
  21. {
  22. cmGeneratorTargetsType tgts = this->GetMakefile()->GetGeneratorTargets();
  23. if (!tgts.empty())
  24. {
  25. for (cmGeneratorTargetsType::iterator l = tgts.begin(); l != tgts.end();
  26. ++l)
  27. {
  28. cmGhsMultiTargetGenerator tg(l->second->Target);
  29. tg.Generate();
  30. }
  31. }
  32. }
  33. // Implemented in:
  34. // cmLocalGenerator.
  35. // Used in:
  36. // Source/cmMakefile.cxx
  37. // Source/cmGlobalGenerator.cxx
  38. void cmLocalGhsMultiGenerator::Configure()
  39. {
  40. // Compute the path to use when referencing the current output
  41. // directory from the top output directory.
  42. this->HomeRelativeOutputPath =
  43. this->Convert(this->Makefile->GetCurrentBinaryDirectory(), HOME_OUTPUT);
  44. if (this->HomeRelativeOutputPath == ".")
  45. {
  46. this->HomeRelativeOutputPath = "";
  47. }
  48. this->cmLocalGenerator::Configure();
  49. }