summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-02-27 22:10:45 (GMT)
committerBrad King <brad.king@kitware.com>2008-02-27 22:10:45 (GMT)
commitdfe2ea6406d3ab22f1a4193906611fb67fd3ab6e (patch)
treee00166515d5fe978ef5fe0dd15852790145951e0 /Source/cmMakefileTargetGenerator.cxx
parent4c137bad6b663ff342064c293a49fecf03498207 (diff)
downloadCMake-dfe2ea6406d3ab22f1a4193906611fb67fd3ab6e.zip
CMake-dfe2ea6406d3ab22f1a4193906611fb67fd3ab6e.tar.gz
CMake-dfe2ea6406d3ab22f1a4193906611fb67fd3ab6e.tar.bz2
ENH: Handle large object file lists on some platforms
- Use a response file when enabled by CMAKE_<LANG>_USE_RESPONSE_FILE_FOR_OBJECTS - Enable for C and CXX with cl (MSVC) - Enable for Fortran with ifort (Intel Fortran)
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileTargetGenerator.cxx24
1 files changed, 24 insertions, 0 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index f268ddf..b15410b 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -1584,6 +1584,30 @@ cmMakefileTargetGenerator
}
//----------------------------------------------------------------------------
+std::string
+cmMakefileTargetGenerator
+::CreateResponseFile(const char* name, std::string const& options,
+ std::vector<std::string>& makefile_depends)
+{
+ // Create the response file.
+ std::string responseFileNameFull = this->TargetBuildDirectoryFull;
+ responseFileNameFull += "/";
+ responseFileNameFull += name;
+ cmGeneratedFileStream responseStream(responseFileNameFull.c_str());
+ responseStream << options << "\n";
+
+ // Add a dependency so the target will rebuild when the set of
+ // objects changes.
+ makefile_depends.push_back(responseFileNameFull);
+
+ // Construct the name to be used on the command line.
+ std::string responseFileName = this->TargetBuildDirectory;
+ responseFileName += "/";
+ responseFileName += name;
+ return responseFileName;
+}
+
+//----------------------------------------------------------------------------
const char* cmMakefileTargetGenerator::GetFortranModuleDirectory()
{
// Compute the module directory.