diff options
author | Brad King <brad.king@kitware.com> | 2015-07-08 20:38:49 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-07-09 13:50:07 (GMT) |
commit | 058074d499805aa4579c8986b84459f9993f6fad (patch) | |
tree | 14509730e516f5117821df68583c7ab64ac61bde /Source/cmMakefileTargetGenerator.cxx | |
parent | ab8240189dd67cc15c5aed59b8c0ffde99d3b403 (diff) | |
download | CMake-058074d499805aa4579c8986b84459f9993f6fad.zip CMake-058074d499805aa4579c8986b84459f9993f6fad.tar.gz CMake-058074d499805aa4579c8986b84459f9993f6fad.tar.bz2 |
cmCommonTargetGenerator: Adopt GetFrameworkFlags
Move the member up from cmMakefileTargetGenerator.
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index e4ae677..68137ef 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1525,67 +1525,6 @@ void cmMakefileTargetGenerator::WriteTargetDriverRule( } //---------------------------------------------------------------------------- -std::string cmMakefileTargetGenerator::GetFrameworkFlags(std::string const& l) -{ - if(!this->Makefile->IsOn("APPLE")) - { - return std::string(); - } - - std::string fwSearchFlagVar = "CMAKE_" + l + "_FRAMEWORK_SEARCH_FLAG"; - const char* fwSearchFlag = - this->Makefile->GetDefinition(fwSearchFlagVar); - if(!(fwSearchFlag && *fwSearchFlag)) - { - return std::string(); - } - - std::set<std::string> emitted; -#ifdef __APPLE__ /* don't insert this when crosscompiling e.g. to iphone */ - emitted.insert("/System/Library/Frameworks"); -#endif - std::vector<std::string> includes; - - const std::string& config = - this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"); - this->LocalGenerator->GetIncludeDirectories(includes, - this->GeneratorTarget, - "C", config); - // check all include directories for frameworks as this - // will already have added a -F for the framework - for(std::vector<std::string>::iterator i = includes.begin(); - i != includes.end(); ++i) - { - if(this->Target->NameResolvesToFramework(*i)) - { - std::string frameworkDir = *i; - frameworkDir += "/../"; - frameworkDir = cmSystemTools::CollapseFullPath(frameworkDir); - emitted.insert(frameworkDir); - } - } - - std::string flags; - const char* cfg = this->LocalGenerator->GetConfigName().c_str(); - if(cmComputeLinkInformation* cli = this->Target->GetLinkInformation(cfg)) - { - std::vector<std::string> const& frameworks = cli->GetFrameworkPaths(); - for(std::vector<std::string>::const_iterator i = frameworks.begin(); - i != frameworks.end(); ++i) - { - if(emitted.insert(*i).second) - { - flags += fwSearchFlag; - flags += this->LocalGenerator - ->ConvertToOutputFormat(*i, cmLocalGenerator::SHELL); - flags += " "; - } - } - } - return flags; -} - -//---------------------------------------------------------------------------- void cmMakefileTargetGenerator ::AppendTargetDepends(std::vector<std::string>& depends) { |