This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, next has been updated via e17e6c2fe24f89c5fab89484bb3d37558eec949f (commit) via d8f8940bc68f09e382320d1ffe36947ba880ae65 (commit) via 7550879f570502f31aeafbd48f04bafd17234696 (commit) via 88d10d55ac68f2251a549cf09292af8a1fb66ba3 (commit) via b5f5de70c0b754010f151cde75783a2cc62db835 (commit) via 8e20ea6ef2258867bd6554536fa7b914f266df96 (commit) from 09ea1692740698a16454f67e35041558960d11e7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e17e6c2fe24f89c5fab89484bb3d37558eec949f commit e17e6c2fe24f89c5fab89484bb3d37558eec949f Merge: 09ea169 d8f8940 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Mon Oct 19 14:28:03 2015 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Mon Oct 19 14:28:03 2015 -0400 Merge topic 'use-generator-target' into next d8f8940b cmGeneratorTarget: Move IsCFBundleOnApple from cmTarget. 7550879f cmGeneratorTarget: Move IsXCTestOnApple from cmTarget. 88d10d55 cmGeneratorTarget: Copy IsAppBundleOnApple from cmTarget. b5f5de70 cmGeneratorTarget: Copy IsFrameworkOnApple from cmTarget. 8e20ea6e cmGeneratorTarget: Move IsLinkable from cmTarget. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d8f8940bc68f09e382320d1ffe36947ba880ae65 commit d8f8940bc68f09e382320d1ffe36947ba880ae65 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Fri Oct 9 23:59:10 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Mon Oct 19 20:27:41 2015 +0200 cmGeneratorTarget: Move IsCFBundleOnApple from cmTarget. diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 9bdf2f5..5177ec8 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -1095,7 +1095,7 @@ cmExportFileGenerator << " PROPERTY MACOSX_BUNDLE 1)\n"; } - if (target->Target->IsCFBundleOnApple()) + if (target->IsCFBundleOnApple()) { os << "set_property(TARGET " << targetName << " PROPERTY BUNDLE 1)\n"; diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 7e457bb..b2959fe 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1574,7 +1574,7 @@ bool cmGeneratorTarget::IsBundleOnApple() const { return this->IsFrameworkOnApple() || this->IsAppBundleOnApple() - || this->Target->IsCFBundleOnApple(); + || this->IsCFBundleOnApple(); } //---------------------------------------------------------------------------- @@ -1943,7 +1943,7 @@ cmGeneratorTarget::BuildMacContentDirectory(const std::string& base, { fpath += this->GetFrameworkDirectory(config, contentOnly); } - if(this->Target->IsCFBundleOnApple()) + if(this->IsCFBundleOnApple()) { fpath += this->GetCFBundleDirectory(config, contentOnly); } @@ -3483,7 +3483,7 @@ void cmGeneratorTarget::GetFullNameInternal(const std::string& config, targetSuffix = 0; } - if(this->Target->IsCFBundleOnApple()) + if(this->IsCFBundleOnApple()) { fw_prefix = this->GetCFBundleDirectory(config, false); fw_prefix += "/"; @@ -5966,6 +5966,14 @@ bool cmGeneratorTarget::IsAppBundleOnApple() const //---------------------------------------------------------------------------- bool cmGeneratorTarget::IsXCTestOnApple() const { - return (this->Target->IsCFBundleOnApple() && + return (this->IsCFBundleOnApple() && this->GetPropertyAsBool("XCTEST")); } + +//---------------------------------------------------------------------------- +bool cmGeneratorTarget::IsCFBundleOnApple() const +{ + return (this->GetType() == cmState::MODULE_LIBRARY && + this->Makefile->IsOn("APPLE") && + this->GetPropertyAsBool("BUNDLE")); +} diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index ce2f42e..6537421 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -425,6 +425,9 @@ public: /** Return whether this target is a XCTest on Apple. */ bool IsXCTestOnApple() const; + /** Return whether this target is a CFBundle (plugin) on Apple. */ + bool IsCFBundleOnApple() const; + struct SourceFileFlags GetTargetSourceFileFlags(const cmSourceFile* sf) const; diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index a489767..ea1b1a0 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -1197,7 +1197,7 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen, // some build phases only apply to bundles and/or frameworks bool isFrameworkTarget = gtgt->IsFrameworkOnApple(); bool isBundleTarget = cmtarget.GetPropertyAsBool("MACOSX_BUNDLE"); - bool isCFBundleTarget = cmtarget.IsCFBundleOnApple(); + bool isCFBundleTarget = gtgt->IsCFBundleOnApple(); cmXCodeObject* buildFiles = 0; @@ -1993,7 +1993,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target, pndir = gtgt->GetDirectory(configName); } - if(gtgt->IsFrameworkOnApple() || target.IsCFBundleOnApple()) + if(gtgt->IsFrameworkOnApple() || gtgt->IsCFBundleOnApple()) { pnprefix = ""; } @@ -2046,7 +2046,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target, { buildSettings->AddAttribute("LIBRARY_STYLE", this->CreateString("BUNDLE")); - if (target.IsCFBundleOnApple()) + if (gtgt->IsCFBundleOnApple()) { // It turns out that a BUNDLE is basically the same // in many ways as an application bundle, as far as @@ -2653,7 +2653,7 @@ const char* cmGlobalXCodeGenerator::GetTargetFileType( case cmState::MODULE_LIBRARY: if (target->IsXCTestOnApple()) return "wrapper.cfbundle"; - else if (target->Target->IsCFBundleOnApple()) + else if (target->IsCFBundleOnApple()) return "wrapper.plug-in"; else return ((this->XcodeVersion >= 22)? @@ -2680,7 +2680,7 @@ const char* cmGlobalXCodeGenerator::GetTargetProductType( case cmState::MODULE_LIBRARY: if (target->IsXCTestOnApple()) return "com.apple.product-type.bundle.unit-test"; - else if (target->Target->IsCFBundleOnApple()) + else if (target->IsCFBundleOnApple()) return "com.apple.product-type.bundle"; else return ((this->XcodeVersion >= 22)? diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index e16dfd7..a97cc5f 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -226,7 +226,7 @@ void cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os, filesFrom.push_back(from1); filesTo.push_back(to1); } - else if(this->Target->Target->IsCFBundleOnApple()) + else if(this->Target->IsCFBundleOnApple()) { // Install the whole app bundle directory. type = cmInstallType_DIRECTORY; diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 015c880..df2a8c9 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -279,7 +279,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules this->OSXBundleGenerator->CreateFramework(targetName, outpath); outpath += "/"; } - else if(this->Target->IsCFBundleOnApple()) + else if(this->GeneratorTarget->IsCFBundleOnApple()) { outpath = this->GeneratorTarget->GetDirectory(this->ConfigName); this->OSXBundleGenerator->CreateCFBundle(targetName, outpath); @@ -360,7 +360,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules buildEcho += " shared library "; break; case cmState::MODULE_LIBRARY: - if (this->Target->IsCFBundleOnApple()) + if (this->GeneratorTarget->IsCFBundleOnApple()) buildEcho += " CFBundle"; buildEcho += " shared module "; break; diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 8a4f17e..dafbda9 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -139,7 +139,7 @@ const char *cmNinjaNormalTargetGenerator::GetVisibleTypeName() const case cmState::SHARED_LIBRARY: return "shared library"; case cmState::MODULE_LIBRARY: - if (this->GetTarget()->IsCFBundleOnApple()) + if (this->GetGeneratorTarget()->IsCFBundleOnApple()) return "CFBundle shared module"; else return "shared module"; @@ -434,7 +434,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() this->OSXBundleGenerator->CreateFramework(this->TargetNameOut, gt.GetDirectory(cfgName)); } - else if(target.IsCFBundleOnApple()) + else if(gt.IsCFBundleOnApple()) { // Create the core foundation bundle. this->OSXBundleGenerator->CreateCFBundle(this->TargetNameOut, diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 02a5ea6..f663678 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -369,14 +369,6 @@ bool cmTarget::IsAppBundleOnApple() const } //---------------------------------------------------------------------------- -bool cmTarget::IsCFBundleOnApple() const -{ - return (this->GetType() == cmState::MODULE_LIBRARY && - this->Makefile->IsOn("APPLE") && - this->GetPropertyAsBool("BUNDLE")); -} - -//---------------------------------------------------------------------------- void cmTarget::AddTracedSources(std::vector<std::string> const& srcs) { if (!srcs.empty()) diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 7cf4808..0e966e9 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -235,9 +235,6 @@ public: Apple. */ bool IsFrameworkOnApple() const; - /** Return whether this target is a CFBundle (plugin) on Apple. */ - bool IsCFBundleOnApple() const; - /** Return whether this target is an executable Bundle on Apple. */ bool IsAppBundleOnApple() const; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7550879f570502f31aeafbd48f04bafd17234696 commit 7550879f570502f31aeafbd48f04bafd17234696 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Sat Oct 10 00:15:38 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Mon Oct 19 20:27:41 2015 +0200 cmGeneratorTarget: Move IsXCTestOnApple from cmTarget. diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index ab0d02b..7e457bb 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1587,7 +1587,7 @@ std::string cmGeneratorTarget::GetCFBundleDirectory(const std::string& config, const char *ext = this->GetProperty("BUNDLE_EXTENSION"); if (!ext) { - if (this->Target->IsXCTestOnApple()) + if (this->IsXCTestOnApple()) { ext = "xctest"; } @@ -5962,3 +5962,10 @@ bool cmGeneratorTarget::IsAppBundleOnApple() const this->Makefile->IsOn("APPLE") && this->GetPropertyAsBool("MACOSX_BUNDLE")); } + +//---------------------------------------------------------------------------- +bool cmGeneratorTarget::IsXCTestOnApple() const +{ + return (this->Target->IsCFBundleOnApple() && + this->GetPropertyAsBool("XCTEST")); +} diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 24a1c2c..ce2f42e 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -422,6 +422,9 @@ public: /** Return whether this target is an executable Bundle on Apple. */ bool IsAppBundleOnApple() const; + /** Return whether this target is a XCTest on Apple. */ + bool IsXCTestOnApple() const; + struct SourceFileFlags GetTargetSourceFileFlags(const cmSourceFile* sf) const; diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 527a84f..a489767 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -2651,7 +2651,7 @@ const char* cmGlobalXCodeGenerator::GetTargetFileType( case cmState::STATIC_LIBRARY: return "archive.ar"; case cmState::MODULE_LIBRARY: - if (target->Target->IsXCTestOnApple()) + if (target->IsXCTestOnApple()) return "wrapper.cfbundle"; else if (target->Target->IsCFBundleOnApple()) return "wrapper.plug-in"; @@ -2678,7 +2678,7 @@ const char* cmGlobalXCodeGenerator::GetTargetProductType( case cmState::STATIC_LIBRARY: return "com.apple.product-type.library.static"; case cmState::MODULE_LIBRARY: - if (target->Target->IsXCTestOnApple()) + if (target->IsXCTestOnApple()) return "com.apple.product-type.bundle.unit-test"; else if (target->Target->IsCFBundleOnApple()) return "com.apple.product-type.bundle"; diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 761267d..02a5ea6 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -377,13 +377,6 @@ bool cmTarget::IsCFBundleOnApple() const } //---------------------------------------------------------------------------- -bool cmTarget::IsXCTestOnApple() const -{ - return (this->IsCFBundleOnApple() && - this->GetPropertyAsBool("XCTEST")); -} - -//---------------------------------------------------------------------------- void cmTarget::AddTracedSources(std::vector<std::string> const& srcs) { if (!srcs.empty()) diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 51e97fd..7cf4808 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -238,9 +238,6 @@ public: /** Return whether this target is a CFBundle (plugin) on Apple. */ bool IsCFBundleOnApple() const; - /** Return whether this target is a XCTest on Apple. */ - bool IsXCTestOnApple() const; - /** Return whether this target is an executable Bundle on Apple. */ bool IsAppBundleOnApple() const; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=88d10d55ac68f2251a549cf09292af8a1fb66ba3 commit 88d10d55ac68f2251a549cf09292af8a1fb66ba3 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Fri Oct 9 23:58:19 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Mon Oct 19 20:27:41 2015 +0200 cmGeneratorTarget: Copy IsAppBundleOnApple from cmTarget. Leave the cmTarget method behind for now to implement cmInstallCommand. diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx index 781220d..3af7b71 100644 --- a/Source/cmExportBuildFileGenerator.cxx +++ b/Source/cmExportBuildFileGenerator.cxx @@ -202,7 +202,7 @@ cmExportBuildFileGenerator std::string prop = "IMPORTED_LOCATION"; prop += suffix; std::string value; - if(target->Target->IsAppBundleOnApple()) + if(target->IsAppBundleOnApple()) { value = target->GetFullPath(config, false); } diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 132c0b5..9bdf2f5 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -1089,7 +1089,7 @@ cmExportFileGenerator } // Mark the imported executable if it is an application bundle. - if(target->Target->IsAppBundleOnApple()) + if(target->IsAppBundleOnApple()) { os << "set_property(TARGET " << targetName << " PROPERTY MACOSX_BUNDLE 1)\n"; diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index d57d67f..a2d6ad1 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -433,7 +433,7 @@ cmExportInstallFileGenerator prop += suffix; // Append the installed file name. - if(target->Target->IsAppBundleOnApple()) + if(target->IsAppBundleOnApple()) { value += itgen->GetInstallFilename(target, config); value += ".app/Contents/MacOS/"; diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 42b5c63..ab0d02b 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -851,7 +851,7 @@ const char* cmGeneratorTarget::GetLocationForBuild() const location += cfgid; } - if(this->Target->IsAppBundleOnApple()) + if(this->IsAppBundleOnApple()) { std::string macdir = this->BuildMacContentDirectory("", "", false); @@ -1573,7 +1573,7 @@ cmGeneratorTarget::GetAppBundleDirectory(const std::string& config, bool cmGeneratorTarget::IsBundleOnApple() const { return this->IsFrameworkOnApple() - || this->Target->IsAppBundleOnApple() + || this->IsAppBundleOnApple() || this->Target->IsCFBundleOnApple(); } @@ -1935,7 +1935,7 @@ cmGeneratorTarget::BuildMacContentDirectory(const std::string& base, bool contentOnly) const { std::string fpath = base; - if(this->Target->IsAppBundleOnApple()) + if(this->IsAppBundleOnApple()) { fpath += this->GetAppBundleDirectory(config, contentOnly); } @@ -3143,7 +3143,7 @@ std::string cmGeneratorTarget::NormalGetFullPath(const std::string& config, { std::string fpath = this->GetDirectory(config, implib); fpath += "/"; - if(this->Target->IsAppBundleOnApple()) + if(this->IsAppBundleOnApple()) { fpath = this->BuildMacContentDirectory(fpath, config, false); fpath += "/"; @@ -3438,8 +3438,7 @@ void cmGeneratorTarget::GetFullNameInternal(const std::string& config, configPostfix = this->GetProperty(configProp); // Mac application bundles and frameworks have no postfix. if(configPostfix && - (this->Target->IsAppBundleOnApple() - || this->IsFrameworkOnApple())) + (this->IsAppBundleOnApple() || this->IsFrameworkOnApple())) { configPostfix = 0; } @@ -5955,3 +5954,11 @@ bool cmGeneratorTarget::IsFrameworkOnApple() const this->Makefile->IsOn("APPLE") && this->GetPropertyAsBool("FRAMEWORK")); } + +//---------------------------------------------------------------------------- +bool cmGeneratorTarget::IsAppBundleOnApple() const +{ + return (this->GetType() == cmState::EXECUTABLE && + this->Makefile->IsOn("APPLE") && + this->GetPropertyAsBool("MACOSX_BUNDLE")); +} diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 471a500..24a1c2c 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -419,6 +419,9 @@ public: Apple. */ bool IsFrameworkOnApple() const; + /** Return whether this target is an executable Bundle on Apple. */ + bool IsAppBundleOnApple() const; + struct SourceFileFlags GetTargetSourceFileFlags(const cmSourceFile* sf) const; diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index 9c0aca0..e16dfd7 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -150,7 +150,7 @@ void cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os, std::string to1 = toDir + targetName; // Handle OSX Bundles. - if(this->Target->Target->IsAppBundleOnApple()) + if(this->Target->IsAppBundleOnApple()) { // Install the whole app bundle directory. type = cmInstallType_DIRECTORY; diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 178b462..31fb37b 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -100,7 +100,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) // Construct the full path version of the names. std::string outpath = this->GeneratorTarget->GetDirectory(this->ConfigName); - if(this->Target->IsAppBundleOnApple()) + if(this->GeneratorTarget->IsAppBundleOnApple()) { this->OSXBundleGenerator->CreateAppBundle(targetName, outpath); } diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 4cfbda5..8a4f17e 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -412,7 +412,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() gt.GetFullPath(cfgName, /*implib=*/true)); - if (target.IsAppBundleOnApple()) + if (gt.IsAppBundleOnApple()) { // Create the app bundle std::string outpath = gt.GetDirectory(cfgName); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b5f5de70c0b754010f151cde75783a2cc62db835 commit b5f5de70c0b754010f151cde75783a2cc62db835 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Fri Oct 9 23:57:17 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Mon Oct 19 20:27:41 2015 +0200 cmGeneratorTarget: Copy IsFrameworkOnApple from cmTarget. Leave the cmTarget method behind for now to implement cmInstallCommand. diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 889c55c..2497f82 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -1111,7 +1111,7 @@ void cmComputeLinkInformation::AddTargetItem(std::string const& item, // For compatibility with CMake 2.4 include the item's directory in // the linker search path. - if(this->OldLinkDirMode && !target->Target->IsFrameworkOnApple() && + if(this->OldLinkDirMode && !target->IsFrameworkOnApple() && this->OldLinkDirMask.find(cmSystemTools::GetFilenamePath(item)) == this->OldLinkDirMask.end()) { diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index fdc21db..132c0b5 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -1082,7 +1082,7 @@ cmExportFileGenerator } // Mark the imported library if it is a framework. - if(target->Target->IsFrameworkOnApple()) + if(target->IsFrameworkOnApple()) { os << "set_property(TARGET " << targetName << " PROPERTY FRAMEWORK 1)\n"; diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index bdf29b2..42b5c63 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1572,7 +1572,7 @@ cmGeneratorTarget::GetAppBundleDirectory(const std::string& config, //---------------------------------------------------------------------------- bool cmGeneratorTarget::IsBundleOnApple() const { - return this->Target->IsFrameworkOnApple() + return this->IsFrameworkOnApple() || this->Target->IsAppBundleOnApple() || this->Target->IsCFBundleOnApple(); } @@ -1939,7 +1939,7 @@ cmGeneratorTarget::BuildMacContentDirectory(const std::string& base, { fpath += this->GetAppBundleDirectory(config, contentOnly); } - if(this->Target->IsFrameworkOnApple()) + if(this->IsFrameworkOnApple()) { fpath += this->GetFrameworkDirectory(config, contentOnly); } @@ -1959,7 +1959,7 @@ cmGeneratorTarget::GetMacContentDirectory(const std::string& config, std::string fpath = this->GetDirectory(config, implib); fpath += "/"; bool contentOnly = true; - if(this->Target->IsFrameworkOnApple()) + if(this->IsFrameworkOnApple()) { // additional files with a framework go into the version specific // directory @@ -3227,7 +3227,7 @@ void cmGeneratorTarget::GetLibraryNames(std::string& name, const char* version = this->GetProperty("VERSION"); const char* soversion = this->GetProperty("SOVERSION"); if(!this->HasSOName(config) || - this->Target->IsFrameworkOnApple()) + this->IsFrameworkOnApple()) { // Versioning is supported only for shared libraries and modules, // and then only when the platform supports an soname flag. @@ -3255,7 +3255,7 @@ void cmGeneratorTarget::GetLibraryNames(std::string& name, // The library name. name = prefix+base+suffix; - if(this->Target->IsFrameworkOnApple()) + if(this->IsFrameworkOnApple()) { realName = prefix; if(!this->Makefile->PlatformIsAppleIos()) @@ -3439,7 +3439,7 @@ void cmGeneratorTarget::GetFullNameInternal(const std::string& config, // Mac application bundles and frameworks have no postfix. if(configPostfix && (this->Target->IsAppBundleOnApple() - || this->Target->IsFrameworkOnApple())) + || this->IsFrameworkOnApple())) { configPostfix = 0; } @@ -3476,7 +3476,7 @@ void cmGeneratorTarget::GetFullNameInternal(const std::string& config, // frameworks have directory prefix but no suffix std::string fw_prefix; - if(this->Target->IsFrameworkOnApple()) + if(this->IsFrameworkOnApple()) { fw_prefix = this->GetOutputName(config, false); fw_prefix += ".framework/"; @@ -5947,3 +5947,11 @@ bool cmGeneratorTarget::IsLinkable() const this->GetType() == cmState::INTERFACE_LIBRARY || this->Target->IsExecutableWithExports()); } + +//---------------------------------------------------------------------------- +bool cmGeneratorTarget::IsFrameworkOnApple() const +{ + return (this->GetType() == cmState::SHARED_LIBRARY && + this->Makefile->IsOn("APPLE") && + this->GetPropertyAsBool("FRAMEWORK")); +} diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index a4a432c..471a500 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -415,6 +415,10 @@ public: /** Return whether this target may be used to link another target. */ bool IsLinkable() const; + /** Return whether this target is a shared library Framework on + Apple. */ + bool IsFrameworkOnApple() const; + struct SourceFileFlags GetTargetSourceFileFlags(const cmSourceFile* sf) const; diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index f54f936..1142ddd 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2208,7 +2208,8 @@ cmGlobalGenerator::NameResolvesToFramework(const std::string& libname) const if(cmTarget* tgt = this->FindTarget(libname)) { - if(tgt->IsFrameworkOnApple()) + cmGeneratorTarget* gt = this->GetGeneratorTarget(tgt); + if(gt->IsFrameworkOnApple()) { return true; } diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 02da028..89a6dff 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -917,11 +917,13 @@ cmGlobalNinjaGenerator std::string configName = target->GetMakefile()->GetSafeDefinition("CMAKE_BUILD_TYPE"); + cmGeneratorTarget *gtgt = this->GetGeneratorTarget(target); + // for frameworks, we want the real name, not smple name // frameworks always appear versioned, and the build.ninja // will always attempt to manage symbolic links instead // of letting cmOSXBundleGenerator do it. - bool realname = target->IsFrameworkOnApple(); + bool realname = gtgt->IsFrameworkOnApple(); switch (target->GetType()) { case cmState::EXECUTABLE: @@ -929,7 +931,6 @@ cmGlobalNinjaGenerator case cmState::STATIC_LIBRARY: case cmState::MODULE_LIBRARY: { - cmGeneratorTarget *gtgt = this->GetGeneratorTarget(target); outputs.push_back(this->ConvertToNinjaPath( gtgt->GetFullPath(configName, false, realname))); break; diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index faaf823..527a84f 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -787,14 +787,16 @@ cmGlobalXCodeGenerator::CreateXCodeSourceFile(cmLocalGenerator* lg, // Is this a resource file in this target? Add it to the resources group... // + + cmGeneratorTarget* gtgt = this->GetGeneratorTarget(&cmtarget); cmGeneratorTarget::SourceFileFlags tsFlags = - this->GetGeneratorTarget(&cmtarget)->GetTargetSourceFileFlags(sf); + gtgt->GetTargetSourceFileFlags(sf); bool isResource = tsFlags.Type == cmGeneratorTarget::SourceFileTypeResource; // Is this a "private" or "public" framework header file? // Set the ATTRIBUTES attribute appropriately... // - if(cmtarget.IsFrameworkOnApple()) + if(gtgt->IsFrameworkOnApple()) { if(tsFlags.Type == cmGeneratorTarget::SourceFileTypePrivateHeader) { @@ -1193,7 +1195,7 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen, } // some build phases only apply to bundles and/or frameworks - bool isFrameworkTarget = cmtarget.IsFrameworkOnApple(); + bool isFrameworkTarget = gtgt->IsFrameworkOnApple(); bool isBundleTarget = cmtarget.GetPropertyAsBool("MACOSX_BUNDLE"); bool isCFBundleTarget = cmtarget.IsCFBundleOnApple(); @@ -1289,7 +1291,7 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen, copyFilesBuildPhase->AddAttribute("dstSubfolderSpec", this->CreateString("6")); std::ostringstream ostr; - if (cmtarget.IsFrameworkOnApple()) + if (gtgt->IsFrameworkOnApple()) { // dstPath in frameworks is relative to Versions/<version> ostr << mit->first; @@ -1467,8 +1469,10 @@ void cmGlobalXCodeGenerator::CreateCustomCommands(cmXCodeObject* buildPhases, std::vector<cmCustomCommand> postbuild = cmtarget.GetPostBuildCommands(); + cmGeneratorTarget* gtgt = this->GetGeneratorTarget(&cmtarget); + if(cmtarget.GetType() == cmState::SHARED_LIBRARY && - !cmtarget.IsFrameworkOnApple()) + !gtgt->IsFrameworkOnApple()) { cmCustomCommandLines cmd; cmd.resize(1); @@ -1500,7 +1504,6 @@ void cmGlobalXCodeGenerator::CreateCustomCommands(cmXCodeObject* buildPhases, } std::vector<cmSourceFile*> classes; - cmGeneratorTarget* gtgt = this->GetGeneratorTarget(&cmtarget); if (!gtgt->GetConfigCommonSourceFiles(classes)) { return; @@ -1943,7 +1946,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target, const char* version = target.GetProperty("VERSION"); const char* soversion = target.GetProperty("SOVERSION"); - if(!gtgt->HasSOName(configName) || target.IsFrameworkOnApple()) + if(!gtgt->HasSOName(configName) || gtgt->IsFrameworkOnApple()) { version = 0; soversion = 0; @@ -1990,7 +1993,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target, pndir = gtgt->GetDirectory(configName); } - if(target.IsFrameworkOnApple() || target.IsCFBundleOnApple()) + if(gtgt->IsFrameworkOnApple() || target.IsCFBundleOnApple()) { pnprefix = ""; } diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index c2798b2..9c0aca0 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -208,7 +208,7 @@ void cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os, // An import library looks like a static library. type = cmInstallType_STATIC_LIBRARY; } - else if(this->Target->Target->IsFrameworkOnApple()) + else if(this->Target->IsFrameworkOnApple()) { // There is a bug in cmInstallCommand if this fails. assert(this->NamelinkMode == NamelinkModeNone); @@ -605,7 +605,7 @@ cmInstallTargetGenerator std::string for_install = this->Target->GetInstallNameDirForInstallTree(); - if(this->Target->Target->IsFrameworkOnApple() && for_install.empty()) + if(this->Target->IsFrameworkOnApple() && for_install.empty()) { // Frameworks seem to have an id corresponding to their own full // path. diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 2ed5f70..015c880 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -153,7 +153,7 @@ void cmMakefileLibraryTargetGenerator::WriteStaticLibraryRules() //---------------------------------------------------------------------------- void cmMakefileLibraryTargetGenerator::WriteSharedLibraryRules(bool relink) { - if(this->Target->IsFrameworkOnApple()) + if(this->GeneratorTarget->IsFrameworkOnApple()) { this->WriteFrameworkRules(relink); return; @@ -273,7 +273,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules // Construct the full path version of the names. std::string outpath; std::string outpathImp; - if(this->Target->IsFrameworkOnApple()) + if(this->GeneratorTarget->IsFrameworkOnApple()) { outpath = this->GeneratorTarget->GetDirectory(this->ConfigName); this->OSXBundleGenerator->CreateFramework(targetName, outpath); @@ -791,7 +791,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules // Add a rule to create necessary symlinks for the library. // Frameworks are handled by cmOSXBundleGenerator. - if(targetOutPath != targetOutPathReal && !this->Target->IsFrameworkOnApple()) + if(targetOutPath != targetOutPathReal + && !this->GeneratorTarget->IsFrameworkOnApple()) { std::string symlink = "$(CMAKE_COMMAND) -E cmake_symlink_library "; symlink += targetOutPathReal; diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index e5e4b7f..4cfbda5 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -281,7 +281,7 @@ cmNinjaNormalTargetGenerator } if (this->TargetNameOut != this->TargetNameReal && - !this->GetTarget()->IsFrameworkOnApple()) { + !this->GetGeneratorTarget()->IsFrameworkOnApple()) { std::string cmakeCommand = this->GetLocalGenerator()->ConvertToOutputFormat( cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL); @@ -428,7 +428,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() targetOutputReal += this->TargetNameReal; targetOutputReal = this->ConvertToNinjaPath(targetOutputReal); } - else if (target.IsFrameworkOnApple()) + else if (gt.IsFrameworkOnApple()) { // Create the library framework. this->OSXBundleGenerator->CreateFramework(this->TargetNameOut, @@ -732,7 +732,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() &usedResponseFile); this->WriteLinkRule(usedResponseFile); - if (targetOutput != targetOutputReal && !target.IsFrameworkOnApple()) + if (targetOutput != targetOutputReal && !gt.IsFrameworkOnApple()) { if (targetType == cmState::EXECUTABLE) { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8e20ea6ef2258867bd6554536fa7b914f266df96 commit 8e20ea6ef2258867bd6554536fa7b914f266df96 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Fri Oct 9 23:44:11 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Mon Oct 19 20:27:40 2015 +0200 cmGeneratorTarget: Move IsLinkable from cmTarget. diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 7bdc555..889c55c 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -643,7 +643,7 @@ void cmComputeLinkInformation::AddItem(std::string const& item, return; } - if(tgt && tgt->Target->IsLinkable()) + if(tgt && tgt->IsLinkable()) { // This is a CMake target. Ask the target for its real name. if(impexe && this->LoaderFlag) diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 3e58400..fdc21db 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -210,7 +210,7 @@ bool cmExportFileGenerator::PopulateInterfaceLinkLibrariesProperty( ImportPropertyMap &properties, std::vector<std::string> &missingTargets) { - if(!target->Target->IsLinkable()) + if(!target->IsLinkable()) { return false; } diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index c7c0e73..1a878e2 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -1654,7 +1654,7 @@ struct TargetFilesystemArtifactResultCreator<ArtifactLinkerTag> const GeneratorExpressionContent *content) { // The file used to link to the target (.so, .lib, .a). - if(!target->Target->IsLinkable()) + if(!target->IsLinkable()) { ::reportError(context, content->GetOriginalExpression(), "TARGET_LINKER_FILE is allowed only for libraries and " diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 03c950e..bdf29b2 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -5936,3 +5936,14 @@ std::string cmGeneratorTarget::GetSupportDirectory() const #endif return dir; } + +//---------------------------------------------------------------------------- +bool cmGeneratorTarget::IsLinkable() const +{ + return (this->GetType() == cmState::STATIC_LIBRARY || + this->GetType() == cmState::SHARED_LIBRARY || + this->GetType() == cmState::MODULE_LIBRARY || + this->GetType() == cmState::UNKNOWN_LIBRARY || + this->GetType() == cmState::INTERFACE_LIBRARY || + this->Target->IsExecutableWithExports()); +} diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 1029158..a4a432c 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -412,6 +412,9 @@ public: /** Get a build-tree directory in which to place target support files. */ std::string GetSupportDirectory() const; + /** Return whether this target may be used to link another target. */ + bool IsLinkable() const; + struct SourceFileFlags GetTargetSourceFileFlags(const cmSourceFile* sf) const; diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index d81d3b8..9af5b35 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -385,7 +385,7 @@ bool cmGlobalVisualStudioGenerator::ComputeTargetDepends() } //---------------------------------------------------------------------------- -static bool VSLinkable(cmTarget const* t) +static bool VSLinkable(cmGeneratorTarget const* t) { return t->IsLinkable() || t->GetType() == cmState::OBJECT_LIBRARY; } @@ -475,7 +475,8 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends(cmTarget& target) di != utilDepends.end(); ++di) { cmTarget const* dep = *di; - if(allowLinkable || !VSLinkable(dep) || linked.count(dep)) + cmGeneratorTarget* dgt = this->GetGeneratorTarget(dep); + if(allowLinkable || !VSLinkable(dgt) || linked.count(dep)) { // Direct dependency allowed. vsTargetDepend.insert(dep->GetName()); diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 57a2d24..761267d 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -345,17 +345,6 @@ bool cmTarget::IsExecutableWithExports() const } //---------------------------------------------------------------------------- -bool cmTarget::IsLinkable() const -{ - return (this->GetType() == cmState::STATIC_LIBRARY || - this->GetType() == cmState::SHARED_LIBRARY || - this->GetType() == cmState::MODULE_LIBRARY || - this->GetType() == cmState::UNKNOWN_LIBRARY || - this->GetType() == cmState::INTERFACE_LIBRARY || - this->IsExecutableWithExports()); -} - -//---------------------------------------------------------------------------- bool cmTarget::HasImportLibrary() const { return (this->DLLPlatform && diff --git a/Source/cmTarget.h b/Source/cmTarget.h index dafe86a..51e97fd 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -228,9 +228,6 @@ public: enabled. */ bool IsExecutableWithExports() const; - /** Return whether this target may be used to link another target. */ - bool IsLinkable() const; - /** Return whether or not the target is for a DLL platform. */ bool IsDLLPlatform() const { return this->DLLPlatform; } ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits