[Cmake-commits] CMake branch, next, updated. v2.8.4-1893-gea85975

David Cole david.cole at kitware.com
Mon Jul 18 16:40:37 EDT 2011


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  ea8597513336d96f5e806235716fe1158fb1952d (commit)
       via  0c030ef72c30d9c8634d0d815b15d9f238b7b267 (commit)
       via  fefaaa09d92b5a2a58f44f433c096db5ec6668ed (commit)
       via  07bb5b77ec9b7f668cd4d2498bc85e8749eb609e (commit)
       via  5d963edc5e7346351fa53aa8b97973da15027f20 (commit)
      from  7af2a19b4024cb0ed17a34182f6de14fd8a66a13 (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 -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ea8597513336d96f5e806235716fe1158fb1952d
commit ea8597513336d96f5e806235716fe1158fb1952d
Merge: 7af2a19 0c030ef
Author:     David Cole <david.cole at kitware.com>
AuthorDate: Mon Jul 18 16:40:34 2011 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jul 18 16:40:34 2011 -0400

    Merge topic 'effective-platform-name' into next
    
    0c030ef Add use of EFFECTIVE_PLATFORM_NAME to generated Xcode projects.
    fefaaa0 KWSys Nightly Date Stamp
    07bb5b7 KWSys Nightly Date Stamp
    5d963ed KWSys Nightly Date Stamp


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0c030ef72c30d9c8634d0d815b15d9f238b7b267
commit 0c030ef72c30d9c8634d0d815b15d9f238b7b267
Author:     David Cole <david.cole at kitware.com>
AuthorDate: Mon Jul 18 15:25:30 2011 -0400
Commit:     David Cole <david.cole at kitware.com>
CommitDate: Mon Jul 18 16:37:06 2011 -0400

    Add use of EFFECTIVE_PLATFORM_NAME to generated Xcode projects.
    
    Facilitates building iOS projects, enabling switching back and forth
    between simulator and device builds at development time.

diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 2cbd3ed..76dd770 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1480,7 +1480,8 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
   BuildObjectListOrString ppDefs(this, this->XcodeVersion >= 30);
   if(this->XcodeVersion > 15)
     {
-    this->AppendDefines(ppDefs, "CMAKE_INTDIR=\"$(CONFIGURATION)\"");
+    this->AppendDefines(ppDefs,
+      "CMAKE_INTDIR=\"$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\"");
     }
   if(const char* exportMacro = target.GetExportMacro())
     {
@@ -1597,9 +1598,12 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
     {
     if(this->XcodeVersion >= 21)
       {
-      std::string pncdir = target.GetDirectory(configName);
-      buildSettings->AddAttribute("CONFIGURATION_BUILD_DIR",
-                                  this->CreateString(pncdir.c_str()));
+      if(!target.UsesDefaultOutputDir(configName, false))
+        {
+        std::string pncdir = target.GetDirectory(configName);
+        buildSettings->AddAttribute("CONFIGURATION_BUILD_DIR",
+                                    this->CreateString(pncdir.c_str()));
+        }
       }
     else
       {
@@ -2399,10 +2403,10 @@ void cmGlobalXCodeGenerator
         {
         if(this->XcodeVersion > 15)
           {
-          // now add the same one but append $(CONFIGURATION) to it:
+          // now add the same one but append $(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) to it:
           linkDirs += " ";
           linkDirs += this->XCodeEscapePath(
-            (*libDir + "/$(CONFIGURATION)").c_str());
+            (*libDir + "/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)").c_str());
           }
         linkDirs += " ";
         linkDirs += this->XCodeEscapePath(libDir->c_str());
@@ -3173,7 +3177,8 @@ cmGlobalXCodeGenerator::WriteXCodePBXProj(std::ostream& fout,
 //----------------------------------------------------------------------------
 const char* cmGlobalXCodeGenerator::GetCMakeCFGInitDirectory()
 {
-  return this->XcodeVersion >= 21? "$(CONFIGURATION)" : ".";
+  return this->XcodeVersion >= 21 ?
+    "$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)" : ".";
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 52b9072..2cb3c01 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -3688,9 +3688,11 @@ const char* cmTarget::GetOutputTargetType(bool implib)
 }
 
 //----------------------------------------------------------------------------
-void cmTarget::ComputeOutputDir(const char* config,
+bool cmTarget::ComputeOutputDir(const char* config,
                                 bool implib, std::string& out)
 {
+  bool usesDefaultOutputDir = false;
+
   // Look for a target property defining the target output directory
   // based on the target type.
   std::string targetTypeName = this->GetOutputTargetType(implib);
@@ -3742,6 +3744,7 @@ void cmTarget::ComputeOutputDir(const char* config,
   if(out.empty())
     {
     // Default to the current output directory.
+    usesDefaultOutputDir = true;
     out = ".";
     }
 
@@ -3757,6 +3760,15 @@ void cmTarget::ComputeOutputDir(const char* config,
     this->Makefile->GetLocalGenerator()->GetGlobalGenerator()->
       AppendDirectoryForConfig("/", config, "", out);
     }
+
+  return usesDefaultOutputDir;
+}
+
+//----------------------------------------------------------------------------
+bool cmTarget::UsesDefaultOutputDir(const char* config, bool implib)
+{
+  std::string dir;
+  return this->ComputeOutputDir(config, implib, dir);
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 3b1f016..28652e2 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -446,6 +446,10 @@ public:
   /** Get a build-tree directory in which to place target support files.  */
   std::string GetSupportDirectory() const;
 
+  /** Return whether this target uses the default value for its output
+      directory.  */
+  bool UsesDefaultOutputDir(const char* config, bool implib);
+
 private:
   /**
    * A list of direct dependencies. Use in conjunction with DependencyMap.
@@ -558,7 +562,7 @@ private:
   // Cache target output paths for each configuration.
   struct OutputInfo;
   OutputInfo const* GetOutputInfo(const char* config);
-  void ComputeOutputDir(const char* config, bool implib, std::string& out);
+  bool ComputeOutputDir(const char* config, bool implib, std::string& out);
 
   // Cache import information from properties for each configuration.
   struct ImportInfo;

-----------------------------------------------------------------------

Summary of changes:
 Source/cmGlobalXCodeGenerator.cxx |   19 ++++++++++++-------
 Source/cmTarget.cxx               |   14 +++++++++++++-
 Source/cmTarget.h                 |    6 +++++-
 Source/kwsys/kwsysDateStamp.cmake |    2 +-
 4 files changed, 31 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list