cmExportTryCompileFileGenerator.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2013 Stephen Kelly <[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. #ifndef cmExportInstallFileGenerator_h
  11. #define cmExportInstallFileGenerator_h
  12. #include "cmExportFileGenerator.h"
  13. class cmInstallExportGenerator;
  14. class cmInstallTargetGenerator;
  15. class cmExportTryCompileFileGenerator: public cmExportFileGenerator
  16. {
  17. public:
  18. /** Set the list of targets to export. */
  19. void SetExports(const std::vector<cmTarget*> &exports)
  20. { this->Exports = exports; }
  21. void SetConfig(const char *config) { this->Config = config; }
  22. protected:
  23. // Implement virtual methods from the superclass.
  24. virtual bool GenerateMainFile(std::ostream& os);
  25. virtual void GenerateImportTargetsConfig(std::ostream&,
  26. const char*,
  27. std::string const&,
  28. std::vector<std::string>&) {}
  29. virtual void HandleMissingTarget(std::string&,
  30. std::vector<std::string>&,
  31. cmMakefile*,
  32. cmTarget*,
  33. cmTarget*) {}
  34. void PopulateProperties(cmTarget* target,
  35. ImportPropertyMap& properties,
  36. std::set<cmTarget*> &emitted);
  37. private:
  38. std::string FindTargets(const char *prop, cmTarget *tgt,
  39. std::set<cmTarget*> &emitted);
  40. std::vector<cmTarget*> Exports;
  41. const char *Config;
  42. };
  43. #endif