BUG: Pass shared library export symbol in DEFINES

The <target>_EXPORTS macro defined for object files when built in a
shared library <target> should be put in the <DEFINES> make rule
replacement and not <FLAGS>.  Also, it should honor the platform
variable CMAKE_<LANG>_DEFINE_FLAG.  See issue #8107.
This commit is contained in:
Brad King 2009-02-27 12:59:52 -05:00
parent 1d3308156e
commit b41c8fe23e
1 changed files with 1 additions and 2 deletions

View File

@ -268,8 +268,7 @@ void cmMakefileTargetGenerator::WriteTargetLanguageFlags()
// Add the export symbol definition for shared library objects. // Add the export symbol definition for shared library objects.
if(const char* exportMacro = this->Target->GetExportMacro()) if(const char* exportMacro = this->Target->GetExportMacro())
{ {
flags += "-D"; this->LocalGenerator->AppendDefines(defines, exportMacro, lang);
flags += exportMacro;
} }
// Add preprocessor definitions for this target and configuration. // Add preprocessor definitions for this target and configuration.