summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2016-06-08 11:23:25 (GMT)
committerBrad King <brad.king@kitware.com>2016-06-10 13:24:49 (GMT)
commitf62ed322dc0d859f595be5ddeff40904ee478f50 (patch)
tree454be55cfcb19e1775cabc0786020e5ec7298260 /Source/cmLocalGenerator.cxx
parent853b1bb4ba176e886e3682a2475f1de1932ee890 (diff)
downloadCMake-f62ed322dc0d859f595be5ddeff40904ee478f50.zip
CMake-f62ed322dc0d859f595be5ddeff40904ee478f50.tar.gz
CMake-f62ed322dc0d859f595be5ddeff40904ee478f50.tar.bz2
cmLocalGenerator: Add GetTargetDefines to get all defines for a target
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 3f957f0..2ccaa82 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1329,6 +1329,20 @@ std::string cmLocalGenerator::GetFrameworkFlags(std::string const& l,
return ::GetFrameworkFlags(l, config, target);
}
+void cmLocalGenerator::GetTargetDefines(cmGeneratorTarget const* target,
+ std::string const& config,
+ std::string const& lang,
+ std::set<std::string>& defines) const
+{
+ // Add the export symbol definition for shared library objects.
+ if (const char* exportMacro = target->GetExportMacro()) {
+ this->AppendDefines(defines, exportMacro);
+ }
+
+ // Add preprocessor definitions for this target and configuration.
+ this->AddCompileDefinitions(defines, target, config, lang.c_str());
+}
+
std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib,
OutputFormat format)
{