add support for borland run time flag for shared builds

This commit is contained in:
Bill Hoffman 2002-11-13 20:14:05 -05:00
parent 26e05fc060
commit b7b32566d2
1 changed files with 17 additions and 1 deletions

View File

@ -939,14 +939,19 @@ void cmLocalUnixMakefileGenerator::OutputExecutableRule(std::ostream& fout,
linkFlags += this->GetSafeDefinition(build.c_str()); linkFlags += this->GetSafeDefinition(build.c_str());
linkFlags += " "; linkFlags += " ";
} }
if(t.HasCxx()) if(t.HasCxx())
{ {
rules.push_back(m_Makefile->GetDefinition("CMAKE_CXX_LINK_EXECUTABLE")); rules.push_back(m_Makefile->GetDefinition("CMAKE_CXX_LINK_EXECUTABLE"));
flags += this->GetSafeDefinition("CMAKE_CXX_FLAGS"); flags += this->GetSafeDefinition("CMAKE_CXX_FLAGS");
flags += " "; flags += " ";
flags += this->GetSafeDefinition("CMAKE_SHARED_LIBRARY_CXX_FLAGS");
flags += " ";
} }
else else
{ {
flags += this->GetSafeDefinition("CMAKE_SHARED_LIBRARY_LINK_FLAGS");
flags += " ";
rules.push_back(m_Makefile->GetDefinition("CMAKE_C_LINK_EXECUTABLE")); rules.push_back(m_Makefile->GetDefinition("CMAKE_C_LINK_EXECUTABLE"));
flags += this->GetSafeDefinition("CMAKE_C_FLAGS"); flags += this->GetSafeDefinition("CMAKE_C_FLAGS");
flags += " "; flags += " ";
@ -962,6 +967,12 @@ void cmLocalUnixMakefileGenerator::OutputExecutableRule(std::ostream& fout,
{ {
commands.push_back(customCommands.c_str()); commands.push_back(customCommands.c_str());
} }
if(cmSystemTools::IsOn(m_Makefile->GetDefinition("BUILD_SHARED_LIBS")))
{
linkFlags += this->GetSafeDefinition("CMAKE_SHARED_BUILD_CXX_FLAGS");
linkFlags += " ";
}
if(t.GetType() == cmTarget::WIN32_EXECUTABLE) if(t.GetType() == cmTarget::WIN32_EXECUTABLE)
{ {
linkFlags += this->GetSafeDefinition("CMAKE_CREATE_WIN32_EXE"); linkFlags += this->GetSafeDefinition("CMAKE_CREATE_WIN32_EXE");
@ -2212,6 +2223,11 @@ OutputBuildObjectFromSource(std::ostream& fout,
} }
case cmSystemTools::CXX_FILE_FORMAT: case cmSystemTools::CXX_FILE_FORMAT:
{ {
if(cmSystemTools::IsOn(m_Makefile->GetDefinition("BUILD_SHARED_LIBS")))
{
flags += this->GetSafeDefinition("CMAKE_SHARED_BUILD_CXX_FLAGS");
flags += " ";
}
rules.push_back(m_Makefile->GetDefinition("CMAKE_CXX_COMPILE_OBJECT")); rules.push_back(m_Makefile->GetDefinition("CMAKE_CXX_COMPILE_OBJECT"));
flags += this->GetSafeDefinition("CMAKE_CXX_FLAGS"); flags += this->GetSafeDefinition("CMAKE_CXX_FLAGS");
flags += " "; flags += " ";