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 7f38595c96edc9059776b1e8fe3b409f1082b45a (commit) via 54a48c6781dd02f2ebbdb19a77c9a4fb59e67735 (commit) via f4977d056b2295679ce723c639f16823cfe489d5 (commit) via 7202db5db46bfe7499244af315249820e883c8cf (commit) via 5995082101a1959f303f9f3d6c0a1e483630749e (commit) via 6a54d28e44c3e539a0f6b45a5bdd748df5ef29ca (commit) from 0412b809f4d426ad1826c10e7f4b2d172906b0ee (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=7f38595c96edc9059776b1e8fe3b409f1082b45a commit 7f38595c96edc9059776b1e8fe3b409f1082b45a Merge: 0412b80 54a48c6 Author: Gregor Jasny <gja...@googlemail.com> AuthorDate: Wed Mar 1 05:13:29 2017 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Wed Mar 1 05:13:29 2017 -0500 Merge topic 'xcode-enhance-schemes' into next 54a48c67 Xcode: Use proper buildable name for schema f4977d05 Xcode: Select executable target for execution in schema 7202db5d Xcode: Fix schema container location calculation 59950821 Xcode: Do not autocreate schemes 6a54d28e Xcode: Use proper indentation for schemes https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=54a48c6781dd02f2ebbdb19a77c9a4fb59e67735 commit 54a48c6781dd02f2ebbdb19a77c9a4fb59e67735 Author: Gregor Jasny <gja...@googlemail.com> AuthorDate: Sat Feb 25 21:26:17 2017 +0100 Commit: Gregor Jasny <gja...@googlemail.com> CommitDate: Tue Feb 28 22:38:30 2017 +0100 Xcode: Use proper buildable name for schema diff --git a/Source/cmXCodeScheme.cxx b/Source/cmXCodeScheme.cxx index 1596e5c..5c22531 100644 --- a/Source/cmXCodeScheme.cxx +++ b/Source/cmXCodeScheme.cxx @@ -15,6 +15,7 @@ cmXCodeScheme::cmXCodeScheme(cmXCodeObject* xcObj, unsigned int xcVersion) : Target(xcObj) , TargetName(xcObj->GetTarget()->GetName()) + , BuildableName(xcObj->GetTarget()->GetFullName()) , TargetId(xcObj->GetId()) , ConfigList(configList) , XcodeVersion(xcVersion) @@ -87,7 +88,7 @@ void cmXCodeScheme::WriteBuildAction(cmXMLWriter& xout, xout.BreakAttributes(); xout.Attribute("BuildableIdentifier", "primary"); xout.Attribute("BlueprintIdentifier", this->TargetId); - xout.Attribute("BuildableName", this->TargetName); + xout.Attribute("BuildableName", this->BuildableName); xout.Attribute("BlueprintName", this->TargetName); xout.Attribute("ReferencedContainer", "container:" + container); xout.EndElement(); @@ -149,7 +150,7 @@ void cmXCodeScheme::WriteLaunchAction(cmXMLWriter& xout, xout.BreakAttributes(); xout.Attribute("BuildableIdentifier", "primary"); xout.Attribute("BlueprintIdentifier", this->TargetId); - xout.Attribute("BuildableName", this->TargetName); + xout.Attribute("BuildableName", this->BuildableName); xout.Attribute("BlueprintName", this->TargetName); xout.Attribute("ReferencedContainer", "container:" + container); xout.EndElement(); diff --git a/Source/cmXCodeScheme.h b/Source/cmXCodeScheme.h index 470b5fd..0a8e737 100644 --- a/Source/cmXCodeScheme.h +++ b/Source/cmXCodeScheme.h @@ -26,6 +26,7 @@ public: private: const cmXCodeObject* const Target; const std::string& TargetName; + const std::string BuildableName; const std::string& TargetId; const std::vector<std::string>& ConfigList; const unsigned int XcodeVersion; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f4977d056b2295679ce723c639f16823cfe489d5 commit f4977d056b2295679ce723c639f16823cfe489d5 Author: Gregor Jasny <gja...@googlemail.com> AuthorDate: Fri Feb 24 18:47:58 2017 +0100 Commit: Gregor Jasny <gja...@googlemail.com> CommitDate: Tue Feb 28 22:38:29 2017 +0100 Xcode: Select executable target for execution in schema diff --git a/Source/cmXCodeScheme.cxx b/Source/cmXCodeScheme.cxx index e5031fd..1596e5c 100644 --- a/Source/cmXCodeScheme.cxx +++ b/Source/cmXCodeScheme.cxx @@ -13,7 +13,8 @@ cmXCodeScheme::cmXCodeScheme(cmXCodeObject* xcObj, const std::vector<std::string>& configList, unsigned int xcVersion) - : TargetName(xcObj->GetTarget()->GetName()) + : Target(xcObj) + , TargetName(xcObj->GetTarget()->GetName()) , TargetId(xcObj->GetId()) , ConfigList(configList) , XcodeVersion(xcVersion) @@ -135,7 +136,14 @@ void cmXCodeScheme::WriteLaunchAction(cmXMLWriter& xout, xout.Attribute("debugServiceExtension", "internal"); xout.Attribute("allowLocationSimulation", "YES"); - xout.StartElement("MacroExpansion"); + if (IsExecutable(this->Target)) { + xout.StartElement("BuildableProductRunnable"); + xout.BreakAttributes(); + xout.Attribute("runnableDebuggingMode", "0"); + + } else { + xout.StartElement("MacroExpansion"); + } xout.StartElement("BuildableReference"); xout.BreakAttributes(); @@ -205,3 +213,14 @@ std::string cmXCodeScheme::FindConfiguration(const std::string& name) return name; } + +bool cmXCodeScheme::IsExecutable(const cmXCodeObject* target) +{ + cmGeneratorTarget* gt = target->GetTarget(); + if (!gt) { + cmSystemTools::Error("Error no target on xobject\n"); + return false; + } + + return gt->GetType() == cmStateEnums::EXECUTABLE; +} diff --git a/Source/cmXCodeScheme.h b/Source/cmXCodeScheme.h index 7a7d930..470b5fd 100644 --- a/Source/cmXCodeScheme.h +++ b/Source/cmXCodeScheme.h @@ -24,6 +24,7 @@ public: const std::string& container); private: + const cmXCodeObject* const Target; const std::string& TargetName; const std::string& TargetId; const std::vector<std::string>& ConfigList; @@ -41,6 +42,8 @@ private: std::string WriteVersionString(); std::string FindConfiguration(const std::string& name); + + static bool IsExecutable(const cmXCodeObject* target); }; #endif https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7202db5db46bfe7499244af315249820e883c8cf commit 7202db5db46bfe7499244af315249820e883c8cf Author: Gregor Jasny <gja...@googlemail.com> AuthorDate: Fri Feb 24 17:31:24 2017 +0100 Commit: Gregor Jasny <gja...@googlemail.com> CommitDate: Tue Feb 28 22:38:29 2017 +0100 Xcode: Fix schema container location calculation diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index f0ebf88..b023d5c 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -3344,7 +3344,7 @@ void cmGlobalXCodeGenerator::OutputXCodeProject( if (this->GetCMakeInstance()->GetState()->GetGlobalPropertyAsBool( "XCODE_GENERATE_SCHEME") && this->XcodeVersion >= 70) { - this->OutputXCodeSharedSchemes(xcodeDir, root); + this->OutputXCodeSharedSchemes(xcodeDir); this->OutputXCodeWorkspaceSettings(xcodeDir); } @@ -3357,7 +3357,7 @@ void cmGlobalXCodeGenerator::OutputXCodeProject( } void cmGlobalXCodeGenerator::OutputXCodeSharedSchemes( - const std::string& xcProjDir, cmLocalGenerator* root) + const std::string& xcProjDir) { for (std::vector<cmXCodeObject*>::const_iterator i = this->XCodeObjects.begin(); @@ -3369,7 +3369,7 @@ void cmGlobalXCodeGenerator::OutputXCodeSharedSchemes( cmXCodeScheme schm(obj, this->CurrentConfigurationTypes, this->XcodeVersion); schm.WriteXCodeSharedScheme(xcProjDir, - root->GetCurrentSourceDirectory()); + this->RelativeToSource(xcProjDir.c_str())); } } } diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h index dcbc77a..9eacdef 100644 --- a/Source/cmGlobalXCodeGenerator.h +++ b/Source/cmGlobalXCodeGenerator.h @@ -166,8 +166,7 @@ private: void OutputXCodeProject(cmLocalGenerator* root, std::vector<cmLocalGenerator*>& generators); // Write shared scheme files for all the native targets - void OutputXCodeSharedSchemes(const std::string& xcProjDir, - cmLocalGenerator* root); + void OutputXCodeSharedSchemes(const std::string& xcProjDir); void OutputXCodeWorkspaceSettings(const std::string& xcProjDir); void WriteXCodePBXProj(std::ostream& fout, cmLocalGenerator* root, std::vector<cmLocalGenerator*>& generators); diff --git a/Source/cmXCodeScheme.cxx b/Source/cmXCodeScheme.cxx index c2d49d8..e5031fd 100644 --- a/Source/cmXCodeScheme.cxx +++ b/Source/cmXCodeScheme.cxx @@ -3,6 +3,7 @@ #include "cmXCodeScheme.h" #include <iomanip> +#include <iostream> #include <sstream> #include "cmGeneratedFileStream.h" @@ -20,7 +21,7 @@ cmXCodeScheme::cmXCodeScheme(cmXCodeObject* xcObj, } void cmXCodeScheme::WriteXCodeSharedScheme(const std::string& xcProjDir, - const std::string sourceRoot) + const std::string& container) { // Create shared scheme sub-directory tree // @@ -39,12 +40,11 @@ void cmXCodeScheme::WriteXCodeSharedScheme(const std::string& xcProjDir, return; } - std::string xcProjRelDir = xcProjDir.substr(sourceRoot.size() + 1); - WriteXCodeXCScheme(fout, xcProjRelDir); + WriteXCodeXCScheme(fout, container); } void cmXCodeScheme::WriteXCodeXCScheme(std::ostream& fout, - const std::string& xcProjDir) + const std::string& container) { cmXMLWriter xout(fout); xout.SetIndentationElement(std::string(3, ' ')); @@ -55,9 +55,9 @@ void cmXCodeScheme::WriteXCodeXCScheme(std::ostream& fout, xout.Attribute("LastUpgradeVersion", WriteVersionString()); xout.Attribute("version", "1.3"); - WriteBuildAction(xout, xcProjDir); + WriteBuildAction(xout, container); WriteTestAction(xout, FindConfiguration("Debug")); - WriteLaunchAction(xout, FindConfiguration("Debug"), xcProjDir); + WriteLaunchAction(xout, FindConfiguration("Debug"), container); WriteProfileAction(xout, FindConfiguration("Release")); WriteAnalyzeAction(xout, FindConfiguration("Debug")); WriteArchiveAction(xout, FindConfiguration("Release")); @@ -66,7 +66,7 @@ void cmXCodeScheme::WriteXCodeXCScheme(std::ostream& fout, } void cmXCodeScheme::WriteBuildAction(cmXMLWriter& xout, - const std::string& xcProjDir) + const std::string& container) { xout.StartElement("BuildAction"); xout.BreakAttributes(); @@ -88,7 +88,7 @@ void cmXCodeScheme::WriteBuildAction(cmXMLWriter& xout, xout.Attribute("BlueprintIdentifier", this->TargetId); xout.Attribute("BuildableName", this->TargetName); xout.Attribute("BlueprintName", this->TargetName); - xout.Attribute("ReferencedContainer", "container:" + xcProjDir); + xout.Attribute("ReferencedContainer", "container:" + container); xout.EndElement(); xout.EndElement(); // BuildActionEntry @@ -119,7 +119,7 @@ void cmXCodeScheme::WriteTestAction(cmXMLWriter& xout, void cmXCodeScheme::WriteLaunchAction(cmXMLWriter& xout, std::string configuration, - const std::string& xcProjDir) + const std::string& container) { xout.StartElement("LaunchAction"); xout.BreakAttributes(); @@ -143,7 +143,7 @@ void cmXCodeScheme::WriteLaunchAction(cmXMLWriter& xout, xout.Attribute("BlueprintIdentifier", this->TargetId); xout.Attribute("BuildableName", this->TargetName); xout.Attribute("BlueprintName", this->TargetName); - xout.Attribute("ReferencedContainer", "container:" + xcProjDir); + xout.Attribute("ReferencedContainer", "container:" + container); xout.EndElement(); xout.EndElement(); // MacroExpansion diff --git a/Source/cmXCodeScheme.h b/Source/cmXCodeScheme.h index b174c51..7a7d930 100644 --- a/Source/cmXCodeScheme.h +++ b/Source/cmXCodeScheme.h @@ -21,7 +21,7 @@ public: unsigned int xcVersion); void WriteXCodeSharedScheme(const std::string& xcProjDir, - const std::string sourceRoot); + const std::string& container); private: const std::string& TargetName; @@ -29,12 +29,12 @@ private: const std::vector<std::string>& ConfigList; const unsigned int XcodeVersion; - void WriteXCodeXCScheme(std::ostream& fout, const std::string& xcProjDir); + void WriteXCodeXCScheme(std::ostream& fout, const std::string& container); - void WriteBuildAction(cmXMLWriter& xout, const std::string& xcProjDir); + void WriteBuildAction(cmXMLWriter& xout, const std::string& container); void WriteTestAction(cmXMLWriter& xout, std::string configuration); void WriteLaunchAction(cmXMLWriter& xout, std::string configuration, - const std::string& xcProjDir); + const std::string& container); void WriteProfileAction(cmXMLWriter& xout, std::string configuration); void WriteAnalyzeAction(cmXMLWriter& xout, std::string configuration); void WriteArchiveAction(cmXMLWriter& xout, std::string configuration); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5995082101a1959f303f9f3d6c0a1e483630749e commit 5995082101a1959f303f9f3d6c0a1e483630749e Author: Gregor Jasny <gja...@googlemail.com> AuthorDate: Fri Feb 24 16:19:14 2017 +0100 Commit: Gregor Jasny <gja...@googlemail.com> CommitDate: Tue Feb 28 22:38:29 2017 +0100 Xcode: Do not autocreate schemes diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index d1b6130..f0ebf88 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -3345,6 +3345,7 @@ void cmGlobalXCodeGenerator::OutputXCodeProject( "XCODE_GENERATE_SCHEME") && this->XcodeVersion >= 70) { this->OutputXCodeSharedSchemes(xcodeDir, root); + this->OutputXCodeWorkspaceSettings(xcodeDir); } this->ClearXCodeObjects(); @@ -3373,6 +3374,36 @@ void cmGlobalXCodeGenerator::OutputXCodeSharedSchemes( } } +void cmGlobalXCodeGenerator::OutputXCodeWorkspaceSettings( + const std::string& xcProjDir) +{ + std::string xcodeSharedDataDir = xcProjDir; + xcodeSharedDataDir += "/project.xcworkspace/xcshareddata"; + cmSystemTools::MakeDirectory(xcodeSharedDataDir); + + std::string workspaceSettingsFile = xcodeSharedDataDir; + workspaceSettingsFile += "/WorkspaceSettings.xcsettings"; + + cmGeneratedFileStream fout(workspaceSettingsFile.c_str()); + fout.SetCopyIfDifferent(true); + if (!fout) { + return; + } + + cmXMLWriter xout(fout); + xout.StartDocument(); + xout.Doctype("plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\"" + "\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\""); + xout.StartElement("plist"); + xout.Attribute("version", "1.0"); + xout.StartElement("dict"); + xout.Element("key", "IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded"); + xout.Element("false"); + xout.EndElement(); // dict + xout.EndElement(); // plist + xout.EndDocument(); +} + void cmGlobalXCodeGenerator::WriteXCodePBXProj(std::ostream& fout, cmLocalGenerator*, std::vector<cmLocalGenerator*>&) diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h index c9157b0..dcbc77a 100644 --- a/Source/cmGlobalXCodeGenerator.h +++ b/Source/cmGlobalXCodeGenerator.h @@ -168,6 +168,7 @@ private: // Write shared scheme files for all the native targets void OutputXCodeSharedSchemes(const std::string& xcProjDir, cmLocalGenerator* root); + void OutputXCodeWorkspaceSettings(const std::string& xcProjDir); void WriteXCodePBXProj(std::ostream& fout, cmLocalGenerator* root, std::vector<cmLocalGenerator*>& generators); cmXCodeObject* CreateXCodeFileReferenceFromPath(const std::string& fullpath, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6a54d28e44c3e539a0f6b45a5bdd748df5ef29ca commit 6a54d28e44c3e539a0f6b45a5bdd748df5ef29ca Author: Gregor Jasny <gja...@googlemail.com> AuthorDate: Fri Feb 24 13:04:21 2017 +0100 Commit: Gregor Jasny <gja...@googlemail.com> CommitDate: Tue Feb 28 22:27:21 2017 +0100 Xcode: Use proper indentation for schemes diff --git a/Source/cmXCodeScheme.cxx b/Source/cmXCodeScheme.cxx index 3c8c0b7..c2d49d8 100644 --- a/Source/cmXCodeScheme.cxx +++ b/Source/cmXCodeScheme.cxx @@ -47,6 +47,7 @@ void cmXCodeScheme::WriteXCodeXCScheme(std::ostream& fout, const std::string& xcProjDir) { cmXMLWriter xout(fout); + xout.SetIndentationElement(std::string(3, ' ')); xout.StartDocument(); xout.StartElement("Scheme"); diff --git a/Source/cmXMLWriter.cxx b/Source/cmXMLWriter.cxx index 2f50fe9..541cb3d 100644 --- a/Source/cmXMLWriter.cxx +++ b/Source/cmXMLWriter.cxx @@ -7,6 +7,7 @@ cmXMLWriter::cmXMLWriter(std::ostream& output, std::size_t level) : Output(output) + , IndentationElement(1, '\t') , Level(level) , ElementOpen(false) , BreakAttrib(false) @@ -100,10 +101,18 @@ void cmXMLWriter::FragmentFile(const char* fname) this->Output << fin.rdbuf(); } +void cmXMLWriter::SetIndentationElement(std::string const& element) +{ + this->IndentationElement = element; +} + void cmXMLWriter::ConditionalLineBreak(bool condition, std::size_t indent) { if (condition) { - this->Output << '\n' << std::string(indent + this->Level, '\t'); + this->Output << '\n'; + for (std::size_t i = 0; i < indent + this->Level; ++i) { + this->Output << this->IndentationElement; + } } } diff --git a/Source/cmXMLWriter.h b/Source/cmXMLWriter.h index 904f73b..6d1e6b4 100644 --- a/Source/cmXMLWriter.h +++ b/Source/cmXMLWriter.h @@ -60,6 +60,8 @@ public: void FragmentFile(const char* fname); + void SetIndentationElement(std::string const& element); + private: cmXMLWriter(const cmXMLWriter&); cmXMLWriter& operator=(const cmXMLWriter&); @@ -107,6 +109,7 @@ private: private: std::ostream& Output; std::stack<std::string, std::vector<std::string> > Elements; + std::string IndentationElement; std::size_t Level; bool ElementOpen; bool BreakAttrib; ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalXCodeGenerator.cxx | 37 +++++++++++++++++++++++++--- Source/cmGlobalXCodeGenerator.h | 4 +-- Source/cmXCodeScheme.cxx | 49 ++++++++++++++++++++++++++----------- Source/cmXCodeScheme.h | 12 ++++++--- Source/cmXMLWriter.cxx | 11 ++++++++- Source/cmXMLWriter.h | 3 +++ 6 files changed, 92 insertions(+), 24 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits