diff options
author | Brad King <brad.king@kitware.com> | 2010-03-11 14:03:26 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-03-11 14:43:33 (GMT) |
commit | f9268c9c818dbf4aec3d7a8d6dd8fbea7da96021 (patch) | |
tree | 41caa346c0cf6c6bc01c4e573b27419acabab6cf /Source/cmMakefileTargetGenerator.cxx | |
parent | 87f0853941f09379f625ae96d67b15b9cb2ad51a (diff) | |
download | CMake-f9268c9c818dbf4aec3d7a8d6dd8fbea7da96021.zip CMake-f9268c9c818dbf4aec3d7a8d6dd8fbea7da96021.tar.gz CMake-f9268c9c818dbf4aec3d7a8d6dd8fbea7da96021.tar.bz2 |
Use platform variable for response file flag
Create platform variable "CMAKE_<LANG>_RESPONSE_FILE_LINK_FLAG" to
specify an alternative to "@" for referencing response files. It
applies specifically to response files with linker options.
See issue #10401.
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index e35e5a3..eae7101 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1620,6 +1620,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) @@ -1637,7 +1648,7 @@ cmMakefileTargetGenerator sep = " "; // Reference the response file. - buildObjs += "@"; + buildObjs += responseFlag; buildObjs += this->Convert(objects_rsp.c_str(), cmLocalGenerator::NONE, cmLocalGenerator::SHELL); |