diff options
author | Brad King <brad.king@kitware.com> | 2007-03-28 03:13:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-03-28 03:13:25 (GMT) |
commit | af95f61d76f2a9e86aed35adae5302c8c60fdb35 (patch) | |
tree | 7ca8e89bb2b0f6d634f4858890041e9480fa67e8 /Source/cmLocalVisualStudio6Generator.cxx | |
parent | 341853c887bcf54a5476bec71216ef34dd5b9295 (diff) | |
download | CMake-af95f61d76f2a9e86aed35adae5302c8c60fdb35.zip CMake-af95f61d76f2a9e86aed35adae5302c8c60fdb35.tar.gz CMake-af95f61d76f2a9e86aed35adae5302c8c60fdb35.tar.bz2 |
ENH: Created method cmTarget::GetExportMacro to centralize computation of the export symbol name. This removes duplicate code from all the generators. Also enabled the export definition for executable targets with the ENABLE_EXPORTS property set.
Diffstat (limited to 'Source/cmLocalVisualStudio6Generator.cxx')
-rw-r--r-- | Source/cmLocalVisualStudio6Generator.cxx | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx index 40ba473..24a381a 100644 --- a/Source/cmLocalVisualStudio6Generator.cxx +++ b/Source/cmLocalVisualStudio6Generator.cxx @@ -1289,18 +1289,13 @@ void cmLocalVisualStudio6Generator staticLibOptions = libflags; } } + + // Add the export symbol definition for shared library objects. std::string exportSymbol; - if (const char* custom_export_name = target.GetProperty("DEFINE_SYMBOL")) + if(const char* exportMacro = target.GetExportMacro()) { - exportSymbol = custom_export_name; + exportSymbol = exportMacro; } - else - { - std::string in = libName; - in += "_EXPORTS"; - exportSymbol = cmSystemTools::MakeCindentifier(in.c_str()); - } - std::string line; while(cmSystemTools::GetLineFromStream(fin, line)) |