summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 86652d3..60e92a0 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -1236,7 +1236,10 @@ int cmake::HandleDeleteCacheVariables(const std::string& var)
if(ci.Find(save.key))
{
save.type = ci.GetType();
- save.help = ci.GetProperty("HELPSTRING");
+ if(const char* help = ci.GetProperty("HELPSTRING"))
+ {
+ save.help = help;
+ }
}
saved.push_back(save);
}
@@ -2273,12 +2276,16 @@ const char *cmake::GetProperty(const std::string& prop,
}
this->SetProperty("ENABLED_LANGUAGES", lang.c_str());
}
+#define STRING_LIST_ELEMENT(F) ";" #F
+ if (prop == "CMAKE_C_KNOWN_FEATURES")
+ {
+ return FOR_EACH_C_FEATURE(STRING_LIST_ELEMENT) + 1;
+ }
if (prop == "CMAKE_CXX_KNOWN_FEATURES")
{
-#define STRING_LIST_ELEMENT(F) ";" #F
return FOR_EACH_CXX_FEATURE(STRING_LIST_ELEMENT) + 1;
-#undef STRING_LIST_ELEMENT
}
+#undef STRING_LIST_ELEMENT
return this->Properties.GetPropertyValue(prop, scope, chain);
}