summaryrefslogtreecommitdiffstats
path: root/Source/cmCoreTryCompile.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2023-07-19 20:41:49 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2023-07-31 15:37:47 (GMT)
commitf6cf4332562adcacf590d9939d6ab591f049cf59 (patch)
treedf1bfd846797eb524b90acd2c3e7b003f73773fb /Source/cmCoreTryCompile.cxx
parent1a538ae07c5a859158e603c6075b352c5f5e294e (diff)
downloadCMake-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/cmCoreTryCompile.cxx')
-rw-r--r--Source/cmCoreTryCompile.cxx6
1 files changed, 5 insertions, 1 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);
}
}