summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGeneratorTarget.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index f8c274a..3f58433 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -316,13 +316,13 @@ std::vector<std::string> cmGeneratorTarget::GetIncludeDirectories()
//----------------------------------------------------------------------------
std::string cmGeneratorTarget::GetCompileDefinitions(const char *config)
{
- if (!config)
+ std::string defPropName = "COMPILE_DEFINITIONS";
+ if (config)
{
- return this->Target->GetProperty("COMPILE_DEFINITIONS");
+ defPropName += "_" + cmSystemTools::UpperCase(config);
}
- std::string defPropName = "COMPILE_DEFINITIONS_";
- defPropName +=
- cmSystemTools::UpperCase(config);
- return this->Target->GetProperty(defPropName.c_str());
+ const char *prop = this->Target->GetProperty(defPropName.c_str());
+
+ return prop ? prop : "";
}