diff options
author | Brad King <brad.king@kitware.com> | 2016-07-20 14:39:38 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-07-20 15:00:56 -0400 |
commit | 34ba5c53481e7f2101dafa735504cb98f94ec6db (patch) | |
tree | e049ca0ea0dc098bcf75ad0dfb2ead07f2ae0c68 /Source/cmMakefileLibraryTargetGenerator.cxx | |
parent | df14a98e9c4af316cd5e75d6af8cc7b75da2db8f (diff) | |
download | cmake-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.cxx | 25 |
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; |