diff options
-rw-r--r-- | Source/cmCoreTryCompile.cxx | 3 | ||||
-rw-r--r-- | Source/cmExperimental.cxx | 6 | ||||
-rw-r--r-- | Source/cmExperimental.h | 8 |
3 files changed, 12 insertions, 5 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index cddbb9b..74f0320 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -1077,7 +1077,8 @@ cm::optional<cmTryCompileResult> cmCoreTryCompile::TryCompileCode( i++) { auto const& data = cmExperimental::DataForFeature( static_cast<cmExperimental::Feature>(i)); - if (data.ForwardThroughTryCompile) { + if (data.ForwardThroughTryCompile == + cmExperimental::TryCompileCondition::Always) { vars.insert(data.Variable); } } diff --git a/Source/cmExperimental.cxx b/Source/cmExperimental.cxx index 51c174e..fcd215c 100644 --- a/Source/cmExperimental.cxx +++ b/Source/cmExperimental.cxx @@ -24,14 +24,14 @@ cmExperimental::FeatureData LookupTable[] = { "CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API", "CMake's C++ module support is experimental. It is meant only for " "experimentation and feedback to CMake developers.", - false, // https://gitlab.kitware.com/cmake/cmake/-/issues/25097 - false }, + // https://gitlab.kitware.com/cmake/cmake/-/issues/25097 + cmExperimental::TryCompileCondition::Never, false }, // WindowsKernelModeDriver { "WindowsKernelModeDriver", "5c2d848d-4efa-4529-a768-efd57171bf68", "CMAKE_EXPERIMENTAL_WINDOWS_KERNEL_MODE_DRIVER", "CMake's Windows kernel-mode driver support is experimental. It is meant " "only for experimentation and feedback to CMake developers.", - true, false }, + cmExperimental::TryCompileCondition::Always, false }, }; static_assert(sizeof(LookupTable) / sizeof(LookupTable[0]) == static_cast<size_t>(cmExperimental::Feature::Sentinel), diff --git a/Source/cmExperimental.h b/Source/cmExperimental.h index 3374ba8..fa1982e 100644 --- a/Source/cmExperimental.h +++ b/Source/cmExperimental.h @@ -20,13 +20,19 @@ public: Sentinel, }; + enum class TryCompileCondition + { + Always, + Never, + }; + struct FeatureData { std::string const Name; std::string const Uuid; std::string const Variable; std::string const Description; - bool const ForwardThroughTryCompile; + TryCompileCondition const ForwardThroughTryCompile; bool Warned; }; |