Kaynağa Gözat

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.
Brad King 16 yıl önce
ebeveyn
işleme
b41c8fe23e
1 değiştirilmiş dosya ile 1 ekleme ve 2 silme
  1. 1 2
      Source/cmMakefileTargetGenerator.cxx

+ 1 - 2
Source/cmMakefileTargetGenerator.cxx

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