summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-06-15 17:58:58 (GMT)
committerBrad King <brad.king@kitware.com>2010-06-15 17:58:58 (GMT)
commitd9b2da139dc4ca145551861c3b2369c5d1bda980 (patch)
tree8bef5d85d5efa4c344b7ebbbdf8d69991f6d4e52 /Source
parentd714b18ac5f415e15c5e03bf8f6aaeaf45e143f5 (diff)
parent00477de1c92d94e78cebdaf6c29ff2847207f454 (diff)
downloadCMake-d9b2da139dc4ca145551861c3b2369c5d1bda980.zip
CMake-d9b2da139dc4ca145551861c3b2369c5d1bda980.tar.gz
CMake-d9b2da139dc4ca145551861c3b2369c5d1bda980.tar.bz2
Merge branch 'mingw-response-files'
Diffstat (limited to 'Source')
-rw-r--r--Source/cmDocumentVariables.cxx2
-rw-r--r--Source/cmLocalGenerator.cxx4
-rw-r--r--Source/cmLocalGenerator.h2
-rw-r--r--Source/cmMakefileTargetGenerator.cxx15
4 files changed, 20 insertions, 3 deletions
diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx
index e77119f..c7848b7 100644
--- a/Source/cmDocumentVariables.cxx
+++ b/Source/cmDocumentVariables.cxx
@@ -1324,6 +1324,8 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
cmProperty::VARIABLE,0,0);
cm->DefineProperty("CMAKE_<LANG>_LINK_FLAGS",
cmProperty::VARIABLE,0,0);
+ cm->DefineProperty("CMAKE_<LANG>_RESPONSE_FILE_LINK_FLAG",
+ cmProperty::VARIABLE,0,0);
cm->DefineProperty("CMAKE_<LANG>_STANDARD_LIBRARIES",
cmProperty::VARIABLE,0,0);
cm->DefineProperty("CMAKE_<LANG>_STANDARD_LIBRARIES_INIT",
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index fd3508e..13d875f 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2249,6 +2249,10 @@ std::string cmLocalGenerator::ConvertToOutputFormat(const char* source,
}
result = this->EscapeForShell(result.c_str(), true, false);
}
+ else if(output == RESPONSE)
+ {
+ result = this->EscapeForShell(result.c_str(), false, false);
+ }
return result;
}
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 4c2fc22..43bf1e7 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -102,7 +102,7 @@ public:
* path setting
*/
enum RelativeRoot { NONE, FULL, HOME, START, HOME_OUTPUT, START_OUTPUT };
- enum OutputFormat { UNCHANGED, MAKEFILE, SHELL };
+ enum OutputFormat { UNCHANGED, MAKEFILE, SHELL, RESPONSE };
std::string ConvertToOutputFormat(const char* source, OutputFormat output);
std::string Convert(const char* remote, RelativeRoot local,
OutputFormat output = UNCHANGED,
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index ac727ac..4c4dbc1 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -1327,7 +1327,7 @@ public:
this->NextObject =
this->LocalGenerator->Convert(obj.c_str(),
cmLocalGenerator::START_OUTPUT,
- cmLocalGenerator::SHELL);
+ cmLocalGenerator::RESPONSE);
// Roll over to next string if the limit will be exceeded.
if(this->LengthLimit != std::string::npos &&
@@ -1621,6 +1621,17 @@ cmMakefileTargetGenerator
std::vector<std::string> object_strings;
this->WriteObjectsStrings(object_strings, responseFileLimit);
+ // Lookup the response file reference flag.
+ std::string responseFlagVar = "CMAKE_";
+ responseFlagVar += this->Target->GetLinkerLanguage(this->ConfigName);
+ responseFlagVar += "_RESPONSE_FILE_LINK_FLAG";
+ const char* responseFlag =
+ this->Makefile->GetDefinition(responseFlagVar.c_str());
+ if(!responseFlag)
+ {
+ responseFlag = "@";
+ }
+
// Write a response file for each string.
const char* sep = "";
for(unsigned int i = 0; i < object_strings.size(); ++i)
@@ -1638,7 +1649,7 @@ cmMakefileTargetGenerator
sep = " ";
// Reference the response file.
- buildObjs += "@";
+ buildObjs += responseFlag;
buildObjs += this->Convert(objects_rsp.c_str(),
cmLocalGenerator::NONE,
cmLocalGenerator::SHELL);