summaryrefslogtreecommitdiff
path: root/Source/cmMakefileLibraryTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-07-20 14:39:38 -0400
committerBrad King <brad.king@kitware.com>2016-07-20 15:00:56 -0400
commit34ba5c53481e7f2101dafa735504cb98f94ec6db (patch)
treee049ca0ea0dc098bcf75ad0dfb2ead07f2ae0c68 /Source/cmMakefileLibraryTargetGenerator.cxx
parentdf14a98e9c4af316cd5e75d6af8cc7b75da2db8f (diff)
downloadcmake-34ba5c53481e7f2101dafa735504cb98f94ec6db.tar.gz
Makefile: Factor out response file checks into common helper
Factor CMAKE_<LANG>_USE_RESPONSE_FILE_FOR_{OBJECTS,LIBRARIES} lookup out into a common helper. Use a separate helper for each because more specific logic may be added to each later.
Diffstat (limited to 'Source/cmMakefileLibraryTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx25
1 files changed, 4 insertions, 21 deletions
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 7de2db0239..68f8ff12af 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -429,27 +429,10 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
// Determine whether a link script will be used.
bool useLinkScript = this->GlobalGenerator->GetUseLinkScript();
- // Select whether to use a response file for objects.
- bool useResponseFileForObjects = false;
- {
- std::string responseVar = "CMAKE_";
- responseVar += linkLanguage;
- responseVar += "_USE_RESPONSE_FILE_FOR_OBJECTS";
- if (this->Makefile->IsOn(responseVar)) {
- useResponseFileForObjects = true;
- }
- }
-
- // Select whether to use a response file for libraries.
- bool useResponseFileForLibs = false;
- {
- std::string responseVar = "CMAKE_";
- responseVar += linkLanguage;
- responseVar += "_USE_RESPONSE_FILE_FOR_LIBRARIES";
- if (this->Makefile->IsOn(responseVar)) {
- useResponseFileForLibs = true;
- }
- }
+ bool useResponseFileForObjects =
+ this->CheckUseResponseFileForObjects(linkLanguage);
+ bool const useResponseFileForLibs =
+ this->CheckUseResponseFileForLibraries(linkLanguage);
// For static libraries there might be archiving rules.
bool haveStaticLibraryRule = false;