summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileExecutableTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-04-18 03:39:47 (GMT)
committerBrad King <brad.king@kitware.com>2007-04-18 03:39:47 (GMT)
commit721ff3692430c8436a5d24fe8a83a20e9012b6bf (patch)
treeb9d1b44a67122d3545346ffb24eecd89bb146798 /Source/cmMakefileExecutableTargetGenerator.cxx
parentb3a05f57dd903e8043cdfb0ea44ca2c6a0404a5c (diff)
downloadCMake-721ff3692430c8436a5d24fe8a83a20e9012b6bf.zip
CMake-721ff3692430c8436a5d24fe8a83a20e9012b6bf.tar.gz
CMake-721ff3692430c8436a5d24fe8a83a20e9012b6bf.tar.bz2
ENH: Added platform variable CMAKE_EXE_EXPORTS_<lang>_FLAG to add a linker flag when building executables that have the ENABLE_EXPORTS property set.
Diffstat (limited to 'Source/cmMakefileExecutableTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index 48aa284..677f9f3 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -257,6 +257,16 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
(linkFlags, this->Makefile->GetDefinition("CMAKE_CREATE_CONSOLE_EXE"));
}
+ // Add symbol export flags if necessary.
+ if(this->Target->GetPropertyAsBool("ENABLE_EXPORTS"))
+ {
+ std::string export_flag_var = "CMAKE_EXE_EXPORTS_";
+ export_flag_var += linkLanguage;
+ export_flag_var += "_FLAG";
+ this->LocalGenerator->AppendFlags
+ (linkFlags, this->Makefile->GetDefinition(export_flag_var.c_str()));
+ }
+
// Add language-specific flags.
this->LocalGenerator
->AddLanguageFlags(flags, linkLanguage,