summaryrefslogtreecommitdiffstats
path: root/Source/cmDSPWriter.cxx
diff options
context:
space:
mode:
authorGeoffrey Cross <geoff@cross.lu>2001-05-09 22:00:03 (GMT)
committerGeoffrey Cross <geoff@cross.lu>2001-05-09 22:00:03 (GMT)
commit401b9eea0b5399b6ddfeccfb4c557cd2c982c22b (patch)
treea0445a756fdb6b7b09b3de82b9d524363a04f5f4 /Source/cmDSPWriter.cxx
parentd1b57f6053fa01c52b11de84f4cbb85d72780300 (diff)
downloadCMake-401b9eea0b5399b6ddfeccfb4c557cd2c982c22b.zip
CMake-401b9eea0b5399b6ddfeccfb4c557cd2c982c22b.tar.gz
CMake-401b9eea0b5399b6ddfeccfb4c557cd2c982c22b.tar.bz2
ADD LINK32s are now on multiple lines because VC breaks otherwise
Diffstat (limited to 'Source/cmDSPWriter.cxx')
-rw-r--r--Source/cmDSPWriter.cxx33
1 files changed, 33 insertions, 0 deletions
diff --git a/Source/cmDSPWriter.cxx b/Source/cmDSPWriter.cxx
index e1babf3..b2001d3 100644
--- a/Source/cmDSPWriter.cxx
+++ b/Source/cmDSPWriter.cxx
@@ -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);