|
|
@@ -34,10 +34,6 @@ enum OutType
|
|
|
OutSet
|
|
|
};
|
|
|
|
|
|
-// Implementation of result storage.
|
|
|
-bool StoreResult(OutType infoType, cmMakefile& makefile,
|
|
|
- const std::string& variable, const char* value);
|
|
|
-
|
|
|
// Implementation of each property type.
|
|
|
bool HandleGlobalMode(cmExecutionStatus& status, const std::string& name,
|
|
|
OutType infoType, const std::string& variable,
|
|
|
@@ -255,8 +251,10 @@ bool cmGetPropertyCommand(std::vector<std::string> const& args,
|
|
|
|
|
|
namespace {
|
|
|
|
|
|
+// Implementation of result storage.
|
|
|
+template <typename ValueType>
|
|
|
bool StoreResult(OutType infoType, cmMakefile& makefile,
|
|
|
- const std::string& variable, const char* value)
|
|
|
+ const std::string& variable, ValueType value)
|
|
|
{
|
|
|
if (infoType == OutSet) {
|
|
|
makefile.AddDefinition(variable, value ? "1" : "0");
|
|
|
@@ -270,10 +268,11 @@ bool StoreResult(OutType infoType, cmMakefile& makefile,
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
|
+template <>
|
|
|
bool StoreResult(OutType infoType, cmMakefile& makefile,
|
|
|
- const std::string& variable, cmProp value)
|
|
|
+ const std::string& variable, std::nullptr_t value)
|
|
|
{
|
|
|
- return StoreResult(infoType, makefile, variable, value.GetCStr());
|
|
|
+ return StoreResult(infoType, makefile, variable, cmProp(value));
|
|
|
}
|
|
|
|
|
|
bool HandleGlobalMode(cmExecutionStatus& status, const std::string& name,
|