diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx index 3ebd1997d..05d3dea4e 100644 --- a/Source/cmLocalUnixMakefileGenerator.cxx +++ b/Source/cmLocalUnixMakefileGenerator.cxx @@ -1061,11 +1061,11 @@ void cmLocalUnixMakefileGenerator::OutputExecutableRule(std::ostream& fout, } else { - flags += this->GetSafeDefinition("CMAKE_SHARED_LIBRARY_LINK_FLAGS"); - flags += " "; rules.push_back(m_Makefile->GetDefinition("CMAKE_C_LINK_EXECUTABLE")); flags += this->GetSafeDefinition("CMAKE_C_FLAGS"); flags += " "; + flags += this->GetSafeDefinition("CMAKE_SHARED_LIBRARY_C_FLAGS"); + flags += " "; } cmOStringStream linklibs; this->OutputLinkLibraries(linklibs, 0, t);