summaryrefslogtreecommitdiffstats
path: root/Source/cmStandardLevelResolver.cxx
diff options
context:
space:
mode:
authorRobert Maynard <rmaynard@nvidia.com>2021-06-21 17:16:29 (GMT)
committerRobert Maynard <rmaynard@nvidia.com>2021-06-25 17:39:50 (GMT)
commita3cafa4237930d1ec1bcbdddc8a9c592e32458ca (patch)
tree33b38924f7edb95ccb18e054be5d757cce179ff5 /Source/cmStandardLevelResolver.cxx
parent66488d4eb31d372d8e06ce78e5f49a7cc43974ee (diff)
downloadCMake-a3cafa4237930d1ec1bcbdddc8a9c592e32458ca.zip
CMake-a3cafa4237930d1ec1bcbdddc8a9c592e32458ca.tar.gz
CMake-a3cafa4237930d1ec1bcbdddc8a9c592e32458ca.tar.bz2
compile_features: Ignore features that map to languages that aren't enabled
Remove the Cuda/ConsumeCompileFeatures test as it only existed to validate that using `cxx_std_XY` would cause the paired language (CUDA) to also build in mode XY.
Diffstat (limited to 'Source/cmStandardLevelResolver.cxx')
-rw-r--r--Source/cmStandardLevelResolver.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmStandardLevelResolver.cxx b/Source/cmStandardLevelResolver.cxx
index 37ed4c1..74b9d6f 100644
--- a/Source/cmStandardLevelResolver.cxx
+++ b/Source/cmStandardLevelResolver.cxx
@@ -387,6 +387,10 @@ bool cmStandardLevelResolver::CheckCompileFeaturesAvailable(
return false;
}
+ if (!this->Makefile->GetGlobalGenerator()->GetLanguageEnabled(lang)) {
+ return true;
+ }
+
const char* features = this->CompileFeaturesAvailable(lang, error);
if (!features) {
return false;