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:
parent
1d3308156e
commit
b41c8fe23e
@ -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.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user