cmExperimental.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. ImportPackageInfo,
  18. ExportPackageInfo,
  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 const Name;
  32. std::string const Uuid;
  33. std::string const Variable;
  34. std::string const Description;
  35. std::vector<std::string> const TryCompileVariables;
  36. TryCompileCondition const ForwardThroughTryCompile;
  37. bool Warned;
  38. };
  39. static const FeatureData& DataForFeature(Feature f);
  40. static cm::optional<Feature> FeatureByName(std::string const& name);
  41. static bool HasSupportEnabled(cmMakefile const& mf, Feature f);
  42. };