summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2012-09-17 17:56:50 (GMT)
committerStephen Kelly <steveire@gmail.com>2012-09-19 13:32:19 (GMT)
commitc31f3d99f8adc95c355f8607bdfccf01cc37c51d (patch)
treeb7eadc1c88e22a045c42bd66b51a15c486559ba6 /Source/cmGeneratorTarget.cxx
parentd1446ca7a0d1de4ede995d64deef057c741ef0c2 (diff)
downloadCMake-c31f3d99f8adc95c355f8607bdfccf01cc37c51d.zip
CMake-c31f3d99f8adc95c355f8607bdfccf01cc37c51d.tar.gz
CMake-c31f3d99f8adc95c355f8607bdfccf01cc37c51d.tar.bz2
Add a wrapper for accessing config-specific compile-definitions.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 044d8ee..db88834 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -379,3 +379,17 @@ std::vector<std::string> cmGeneratorTarget::GetIncludeDirectories()
return orderedAndUniqueIncludes;
}
+
+//----------------------------------------------------------------------------
+const char *cmGeneratorTarget::GetCompileDefinitions(const char *config)
+{
+ if (!config)
+ {
+ return this->Target->GetProperty("COMPILE_DEFINITIONS");
+ }
+ std::string defPropName = "COMPILE_DEFINITIONS_";
+ defPropName +=
+ cmSystemTools::UpperCase(config);
+
+ return this->Target->GetProperty(defPropName.c_str());
+}