diff options
author | Stephen Kelly <steveire@gmail.com> | 2016-10-08 10:21:36 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2016-10-10 18:38:53 (GMT) |
commit | 5b361fdda0f2808f0368b746a880981ebda0ade0 (patch) | |
tree | f1c0ed09db22c32951b8fea68e15a2ccd94aff84 /Source/cmServerProtocol.cxx | |
parent | 2e5d1990f382aa42e8a0ad34117ee1e5a9187153 (diff) | |
download | CMake-5b361fdda0f2808f0368b746a880981ebda0ade0.zip CMake-5b361fdda0f2808f0368b746a880981ebda0ade0.tar.gz CMake-5b361fdda0f2808f0368b746a880981ebda0ade0.tar.bz2 |
cmLinkLineComputer: Extract from cmLocalGenerator
CMake has several classes which have too many responsibilities.
cmLocalGenerator is one of them. Start to extract the link line
computation. Create generator-specific implementations of the interface
to account for generator-specific behavior.
Unfortunately MSVC60 has different behavior to everything else and CMake
still generates makefiles for it. Isolate it with MSVC60-specific
names.
Diffstat (limited to 'Source/cmServerProtocol.cxx')
-rw-r--r-- | Source/cmServerProtocol.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index a2bdf49..a58510e 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -7,6 +7,7 @@ #include "cmFileMonitor.h" #include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" +#include "cmLinkLineComputer.h" #include "cmListFileCache.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" @@ -728,8 +729,12 @@ static Json::Value DumpTarget(cmGeneratorTarget* target, std::string linkLanguageFlags; std::string frameworkPath; std::string linkPath; - lg->GetTargetFlags(config, linkLibs, linkLanguageFlags, linkFlags, - frameworkPath, linkPath, target, false); + CM_AUTO_PTR<cmLinkLineComputer> linkLineComputer( + lg->GetGlobalGenerator()->CreateLinkLineComputer( + lg->GetStateSnapshot().GetDirectory())); + lg->GetTargetFlags(linkLineComputer.get(), config, linkLibs, + linkLanguageFlags, linkFlags, frameworkPath, linkPath, + target, false); linkLibs = cmSystemTools::TrimWhitespace(linkLibs); linkFlags = cmSystemTools::TrimWhitespace(linkFlags); |