cmExperimental.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file LICENSE.rst or https://cmake.org/licensing for details. */
  3. #pragma once
  4. #include "cmConfigure.h" // IWYU pragma: keep
  5. #include <string>
  6. #include <vector>
  7. #include <cm/optional>
  8. class cmMakefile;
  9. class cmExperimental
  10. {
  11. public:
  12. enum class Feature
  13. {
  14. ExportPackageDependencies,
  15. CxxImportStd,
  16. ImportPackageInfo,
  17. ExportPackageInfo,
  18. MappedPackageInfo,
  19. ExportBuildDatabase,
  20. Instrumentation,
  21. Sentinel,
  22. };
  23. enum class TryCompileCondition
  24. {
  25. Always,
  26. SkipCompilerChecks,
  27. Never,
  28. };
  29. struct FeatureData
  30. {
  31. std::string Name;
  32. std::string Uuid;
  33. std::string Variable;
  34. std::string Description;
  35. std::vector<std::string> TryCompileVariables;
  36. TryCompileCondition ForwardThroughTryCompile;
  37. };
  38. static FeatureData const& DataForFeature(Feature f);
  39. static cm::optional<Feature> FeatureByName(std::string const& name);
  40. static bool HasSupportEnabled(cmMakefile const& mf, Feature f);
  41. };