cmExperimental.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt 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. WindowsKernelModeDriver,
  16. CxxImportStd,
  17. ExportPackageInfo,
  18. Sentinel,
  19. };
  20. enum class TryCompileCondition
  21. {
  22. Always,
  23. SkipCompilerChecks,
  24. Never,
  25. };
  26. struct FeatureData
  27. {
  28. std::string const Name;
  29. std::string const Uuid;
  30. std::string const Variable;
  31. std::string const Description;
  32. std::vector<std::string> const TryCompileVariables;
  33. TryCompileCondition const ForwardThroughTryCompile;
  34. bool Warned;
  35. };
  36. static const FeatureData& DataForFeature(Feature f);
  37. static cm::optional<Feature> FeatureByName(std::string const& name);
  38. static bool HasSupportEnabled(cmMakefile const& mf, Feature f);
  39. };