diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2023-07-19 20:41:49 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2023-07-31 15:37:47 (GMT) |
commit | f6cf4332562adcacf590d9939d6ab591f049cf59 (patch) | |
tree | df1bfd846797eb524b90acd2c3e7b003f73773fb /Source | |
parent | 1a538ae07c5a859158e603c6075b352c5f5e294e (diff) | |
download | CMake-f6cf4332562adcacf590d9939d6ab591f049cf59.zip CMake-f6cf4332562adcacf590d9939d6ab591f049cf59.tar.gz CMake-f6cf4332562adcacf590d9939d6ab591f049cf59.tar.bz2 |
cmExperimental: only forward C++ module support to non-ABI checks
ABI checks never use modules, so don't forward the experimental status
through.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmCoreTryCompile.cxx | 6 | ||||
-rw-r--r-- | Source/cmExperimental.cxx | 3 | ||||
-rw-r--r-- | Source/cmExperimental.h | 1 |
3 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index 74f0320..7045aa7 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -1078,7 +1078,11 @@ cm::optional<cmTryCompileResult> cmCoreTryCompile::TryCompileCode( auto const& data = cmExperimental::DataForFeature( static_cast<cmExperimental::Feature>(i)); if (data.ForwardThroughTryCompile == - cmExperimental::TryCompileCondition::Always) { + cmExperimental::TryCompileCondition::Always || + (data.ForwardThroughTryCompile == + cmExperimental::TryCompileCondition::SkipCompilerChecks && + arguments.CMakeInternal != "ABI"_s && + arguments.CMakeInternal != "FEATURE_TESTING"_s)) { vars.insert(data.Variable); } } diff --git a/Source/cmExperimental.cxx b/Source/cmExperimental.cxx index fcd215c..68bd964 100644 --- a/Source/cmExperimental.cxx +++ b/Source/cmExperimental.cxx @@ -24,8 +24,7 @@ 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.", - // https://gitlab.kitware.com/cmake/cmake/-/issues/25097 - cmExperimental::TryCompileCondition::Never, false }, + cmExperimental::TryCompileCondition::SkipCompilerChecks, false }, // WindowsKernelModeDriver { "WindowsKernelModeDriver", "5c2d848d-4efa-4529-a768-efd57171bf68", "CMAKE_EXPERIMENTAL_WINDOWS_KERNEL_MODE_DRIVER", diff --git a/Source/cmExperimental.h b/Source/cmExperimental.h index fa1982e..0768146 100644 --- a/Source/cmExperimental.h +++ b/Source/cmExperimental.h @@ -23,6 +23,7 @@ public: enum class TryCompileCondition { Always, + SkipCompilerChecks, Never, }; |