Commit 401b9eea authored by Geoffrey Cross's avatar Geoffrey Cross
Browse files

ADD LINK32s are now on multiple lines because VC breaks otherwise

parent d1b57f60
......@@ -63,7 +63,9 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /IGNORE:4089
# ADD LINK32 CM_OPTIMIZED_LIBRARIES CM_LIBRARIES kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /IGNORE:4089
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /IGNORE:4089
CM_MULTILINE_OPTIMIZED_LIBRARIES
CM_MULTILINE_LIBRARIES
!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Debug"
......@@ -88,7 +90,9 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /IGNORE:4089
# ADD LINK32 CM_DEBUG_LIBRARIES CM_LIBRARIES kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /IGNORE:4089
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /IGNORE:4089
CM_MULTILINE_DEBUG_LIBRARIES
CM_MULTILINE_LIBRARIES
!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Release MinSize"
# PROP BASE Use_MFC 0
......@@ -110,7 +114,9 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /IGNORE:4089
# ADD LINK32 CM_OPTIMIZED_LIBRARIES CM_LIBRARIES kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /IGNORE:4089
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /IGNORE:4089
CM_MULTILINE_OPTIMIZED_LIBRARIES
CM_MULTILINE_LIBRARIES
!ENDIF
......
......@@ -418,6 +418,11 @@ void cmDSPMakefile::WriteDSPHeader(std::ostream& fout, const char *libName,
std::string libOptions;
std::string libDebugOptions;
std::string libOptimizedOptions;
std::string libMultiLineOptions;
std::string libMultiLineDebugOptions;
std::string libMultiLineOptimizedOptions;
std::vector<std::string>::iterator i;
std::vector<std::string>& libdirs = m_Makefile->GetLinkDirectories();
for(i = libdirs.begin(); i != libdirs.end(); ++i)
......@@ -428,6 +433,13 @@ void cmDSPMakefile::WriteDSPHeader(std::ostream& fout, const char *libName,
libOptions += " /LIBPATH:\"";
libOptions += *i;
libOptions += "\" ";
libMultiLineOptions += "# ADD LINK32 /LIBPATH:\"";
libMultiLineOptions += *i;
libMultiLineOptions += "/$(OUTDIR)\" ";
libMultiLineOptions += " /LIBPATH:\"";
libMultiLineOptions += *i;
libMultiLineOptions += "\" \n";
}
// find link libraries
const cmTarget::LinkLibraries& libs = target.GetLinkLibraries();
......@@ -449,20 +461,33 @@ void cmDSPMakefile::WriteDSPHeader(std::ostream& fout, const char *libName,
{
libOptions += " ";
libOptions += lib;
libMultiLineOptions += "# ADD LINK32 ";
libMultiLineOptions += lib;
libMultiLineOptions += "\n";
}
if (j->second == cmTarget::DEBUG)
{
libDebugOptions += " ";
libDebugOptions += lib;
libMultiLineDebugOptions += "# ADD LINK32 ";
libMultiLineDebugOptions += lib;
libMultiLineDebugOptions += "\n";
}
if (j->second == cmTarget::OPTIMIZED)
{
libOptimizedOptions += " ";
libOptimizedOptions += lib;
libMultiLineOptimizedOptions += "# ADD LINK32 ";
libMultiLineOptimizedOptions += lib;
libMultiLineOptimizedOptions += "\n";
}
}
}
libOptions += " /STACK:10000000 ";
libMultiLineOptions += "# ADD LINK32 /STACK:10000000 \n";
std::ifstream fin(m_DSPHeaderTemplate.c_str());
if(!fin)
......@@ -481,6 +506,14 @@ void cmDSPMakefile::WriteDSPHeader(std::ostream& fout, const char *libName,
libDebugOptions.c_str());
cmSystemTools::ReplaceString(line, "CM_OPTIMIZED_LIBRARIES",
libOptimizedOptions.c_str());
cmSystemTools::ReplaceString(line, "CM_MULTILINE_LIBRARIES",
libMultiLineOptions.c_str());
cmSystemTools::ReplaceString(line, "CM_MULTILINE_DEBUG_LIBRARIES",
libMultiLineDebugOptions.c_str());
cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIMIZED_LIBRARIES",
libMultiLineOptimizedOptions.c_str());
cmSystemTools::ReplaceString(line, "BUILD_INCLUDES",
m_IncludeOptions.c_str());
cmSystemTools::ReplaceString(line, "OUTPUT_LIBNAME",libName);
......
......@@ -418,6 +418,11 @@ void cmDSPMakefile::WriteDSPHeader(std::ostream& fout, const char *libName,
std::string libOptions;
std::string libDebugOptions;
std::string libOptimizedOptions;
std::string libMultiLineOptions;
std::string libMultiLineDebugOptions;
std::string libMultiLineOptimizedOptions;
std::vector<std::string>::iterator i;
std::vector<std::string>& libdirs = m_Makefile->GetLinkDirectories();
for(i = libdirs.begin(); i != libdirs.end(); ++i)
......@@ -428,6 +433,13 @@ void cmDSPMakefile::WriteDSPHeader(std::ostream& fout, const char *libName,
libOptions += " /LIBPATH:\"";
libOptions += *i;
libOptions += "\" ";
libMultiLineOptions += "# ADD LINK32 /LIBPATH:\"";
libMultiLineOptions += *i;
libMultiLineOptions += "/$(OUTDIR)\" ";
libMultiLineOptions += " /LIBPATH:\"";
libMultiLineOptions += *i;
libMultiLineOptions += "\" \n";
}
// find link libraries
const cmTarget::LinkLibraries& libs = target.GetLinkLibraries();
......@@ -449,20 +461,33 @@ void cmDSPMakefile::WriteDSPHeader(std::ostream& fout, const char *libName,
{
libOptions += " ";
libOptions += lib;
libMultiLineOptions += "# ADD LINK32 ";
libMultiLineOptions += lib;
libMultiLineOptions += "\n";
}
if (j->second == cmTarget::DEBUG)
{
libDebugOptions += " ";
libDebugOptions += lib;
libMultiLineDebugOptions += "# ADD LINK32 ";
libMultiLineDebugOptions += lib;
libMultiLineDebugOptions += "\n";
}
if (j->second == cmTarget::OPTIMIZED)
{
libOptimizedOptions += " ";
libOptimizedOptions += lib;
libMultiLineOptimizedOptions += "# ADD LINK32 ";
libMultiLineOptimizedOptions += lib;
libMultiLineOptimizedOptions += "\n";
}
}
}
libOptions += " /STACK:10000000 ";
libMultiLineOptions += "# ADD LINK32 /STACK:10000000 \n";
std::ifstream fin(m_DSPHeaderTemplate.c_str());
if(!fin)
......@@ -481,6 +506,14 @@ void cmDSPMakefile::WriteDSPHeader(std::ostream& fout, const char *libName,
libDebugOptions.c_str());
cmSystemTools::ReplaceString(line, "CM_OPTIMIZED_LIBRARIES",
libOptimizedOptions.c_str());
cmSystemTools::ReplaceString(line, "CM_MULTILINE_LIBRARIES",
libMultiLineOptions.c_str());
cmSystemTools::ReplaceString(line, "CM_MULTILINE_DEBUG_LIBRARIES",
libMultiLineDebugOptions.c_str());
cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIMIZED_LIBRARIES",
libMultiLineOptimizedOptions.c_str());
cmSystemTools::ReplaceString(line, "BUILD_INCLUDES",
m_IncludeOptions.c_str());
cmSystemTools::ReplaceString(line, "OUTPUT_LIBNAME",libName);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment