cmExportTryCompileFileGenerator.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. cmExportTryCompileFileGenerator(cmGlobalGenerator* gg);
  19. /** Set the list of targets to export. */
  20. void SetExports(const std::vector<cmTarget const*> &exports)
  21. { this->Exports = exports; }
  22. void SetConfig(const std::string& config) { this->Config = config; }
  23. protected:
  24. // Implement virtual methods from the superclass.
  25. virtual bool GenerateMainFile(std::ostream& os);
  26. virtual void GenerateImportTargetsConfig(std::ostream&,
  27. const std::string&,
  28. std::string const&,
  29. std::vector<std::string>&) {}
  30. virtual void HandleMissingTarget(std::string&,
  31. std::vector<std::string>&,
  32. cmMakefile*,
  33. cmTarget*,
  34. cmTarget*) {}
  35. void PopulateProperties(cmTarget const* target,
  36. ImportPropertyMap& properties,
  37. std::set<cmTarget const*> &emitted);
  38. std::string InstallNameDir(cmTarget* target,
  39. const std::string& config);
  40. private:
  41. std::string FindTargets(const std::string& prop, cmTarget const* tgt,
  42. std::set<cmTarget const*> &emitted);
  43. std::vector<cmTarget const*> Exports;
  44. std::string Config;
  45. };
  46. #endif