summaryrefslogtreecommitdiffstats
path: root/Source/cmUnixMakefileGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmUnixMakefileGenerator.cxx')
-rw-r--r--Source/cmUnixMakefileGenerator.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx
index b002400..133398d 100644
--- a/Source/cmUnixMakefileGenerator.cxx
+++ b/Source/cmUnixMakefileGenerator.cxx
@@ -760,6 +760,13 @@ void cmUnixMakefileGenerator::OutputMakeVariables(std::ostream& fout)
"\n"
"\n";
std::string replaceVars = variables;
+ bool dll = cmCacheManager::GetInstance()->IsOn("BUILD_SHARED_LIBS");
+ if(!dll)
+ {
+ // if not a dll then remove the shlib -fpic flag
+ m_Makefile->AddDefinition("CMAKE_SHLIB_CFLAGS", "");
+ }
+
m_Makefile->ExpandVariablesInString(replaceVars);
fout << replaceVars.c_str();
fout << "CMAKE_CURRENT_SOURCE = " << m_Makefile->GetStartDirectory() << "\n";