summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileLibraryTargetGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmMakefileLibraryTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx22
1 files changed, 18 insertions, 4 deletions
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 60303ea..4ae00db 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -246,16 +246,23 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
// Add the link message.
std::string buildEcho = "Linking ";
buildEcho += linkLanguage;
+ const char* forbiddenFlagVar = 0;
switch(this->Target->GetType())
{
case cmTarget::STATIC_LIBRARY:
- buildEcho += " static library "; break;
+ buildEcho += " static library ";
+ break;
case cmTarget::SHARED_LIBRARY:
- buildEcho += " shared library "; break;
+ forbiddenFlagVar = "_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS";
+ buildEcho += " shared library ";
+ break;
case cmTarget::MODULE_LIBRARY:
- buildEcho += " shared module "; break;
+ forbiddenFlagVar = "_CREATE_SHARED_MODULE_FORBIDDEN_FLAGS";
+ buildEcho += " shared module ";
+ break;
default:
- buildEcho += " library "; break;
+ buildEcho += " library ";
+ break;
}
buildEcho += targetOutPath.c_str();
this->LocalGenerator->AppendEcho(commands, buildEcho.c_str());
@@ -436,6 +443,13 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
this->LocalGenerator
->AddLanguageFlags(langFlags, linkLanguage,
this->LocalGenerator->m_ConfigurationName.c_str());
+ // remove any language flags that might not work with the
+ // particular os
+ if(forbiddenFlagVar)
+ {
+ this->RemoveForbiddenFlags(forbiddenFlagVar,
+ linkLanguage, langFlags);
+ }
vars.LanguageCompileFlags = langFlags.c_str();
// Expand placeholders in the commands.
this->LocalGenerator->m_TargetImplib = targetOutPathImport;