[Cmake-commits] [cmake-commits] hoffman committed cmFileCommand.cxx 1.103.2.3 1.103.2.4 cmFindBase.cxx 1.35.2.1 1.35.2.2 cmListCommand.cxx 1.18.2.4 1.18.2.5 cmLocalGenerator.cxx 1.269.2.2 1.269.2.3 cmLocalVisualStudio6Generator.cxx 1.141.2.1 1.141.2.2 cmLocalVisualStudio7Generator.cxx 1.217.2.5 1.217.2.6 cmMakefileTargetGenerator.cxx 1.93.2.4 1.93.2.5 cmSourceGroup.cxx 1.19 1.19.2.1 cmSourceGroup.h 1.19 1.19.12.1 cmTarget.cxx 1.207.2.6 1.207.2.7

cmake-commits at cmake.org cmake-commits at cmake.org
Fri May 23 16:09:42 EDT 2008


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv22726/Source

Modified Files:
      Tag: CMake-2-6
	cmFileCommand.cxx cmFindBase.cxx cmListCommand.cxx 
	cmLocalGenerator.cxx cmLocalVisualStudio6Generator.cxx 
	cmLocalVisualStudio7Generator.cxx 
	cmMakefileTargetGenerator.cxx cmSourceGroup.cxx 
	cmSourceGroup.h cmTarget.cxx 
Log Message:
ENH: push in changes from head


Index: cmSourceGroup.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSourceGroup.cxx,v
retrieving revision 1.19
retrieving revision 1.19.2.1
diff -C 2 -d -r1.19 -r1.19.2.1
*** cmSourceGroup.cxx	24 Aug 2007 18:21:49 -0000	1.19
--- cmSourceGroup.cxx	23 May 2008 20:09:38 -0000	1.19.2.1
***************
*** 17,27 ****
--- 17,61 ----
  #include "cmSourceGroup.h"
  
+ class cmSourceGroupInternals
+ {
+ public:
+   std::vector<cmSourceGroup> GroupChildren;
+ };
+ 
  //----------------------------------------------------------------------------
  cmSourceGroup::cmSourceGroup(const char* name, const char* regex): Name(name)
  {
+   this->Internal = new cmSourceGroupInternals;
    this->SetGroupRegex(regex);
  }
  
  //----------------------------------------------------------------------------
+ cmSourceGroup::~cmSourceGroup()
+ {
+   delete this->Internal;
+ }
+ 
+ //----------------------------------------------------------------------------
+ cmSourceGroup::cmSourceGroup(cmSourceGroup const& r)
+ {
+   this->Name = r.Name;
+   this->GroupRegex = r.GroupRegex;
+   this->GroupFiles = r.GroupFiles;
+   this->SourceFiles = r.SourceFiles;
+   this->Internal = new cmSourceGroupInternals(*r.Internal);
+ }
+ 
+ //----------------------------------------------------------------------------
+ cmSourceGroup& cmSourceGroup::operator=(cmSourceGroup const& r)
+ {
+   this->Name = r.Name;
+   this->GroupRegex = r.GroupRegex;
+   this->GroupFiles = r.GroupFiles;
+   this->SourceFiles = r.SourceFiles;
+   *(this->Internal) = *(r.Internal);
+   return *this;
+ }
+ 
+ //----------------------------------------------------------------------------
  void cmSourceGroup::SetGroupRegex(const char* regex)
  {
***************
*** 86,90 ****
  void cmSourceGroup::AddChild(cmSourceGroup child)
  {
!   this->GroupChildren.push_back(child);
  }
  
--- 120,124 ----
  void cmSourceGroup::AddChild(cmSourceGroup child)
  {
!   this->Internal->GroupChildren.push_back(child);
  }
  
***************
*** 93,98 ****
  {
    // initializing iterators
!   std::vector<cmSourceGroup>::iterator iter = this->GroupChildren.begin();
!   std::vector<cmSourceGroup>::iterator end = this->GroupChildren.end();
  
    // st
--- 127,134 ----
  {
    // initializing iterators
!   std::vector<cmSourceGroup>::iterator iter =
!     this->Internal->GroupChildren.begin();
!   std::vector<cmSourceGroup>::iterator end =
!     this->Internal->GroupChildren.end();
  
    // st
***************
*** 115,120 ****
  {
    // initializing iterators
!   std::vector<cmSourceGroup>::iterator iter = this->GroupChildren.begin();
!   std::vector<cmSourceGroup>::iterator end = this->GroupChildren.end();
  
    if(this->MatchesFiles(name))
--- 151,158 ----
  {
    // initializing iterators
!   std::vector<cmSourceGroup>::iterator iter =
!     this->Internal->GroupChildren.begin();
!   std::vector<cmSourceGroup>::iterator end =
!     this->Internal->GroupChildren.end();
  
    if(this->MatchesFiles(name))
***************
*** 137,142 ****
  {
    // initializing iterators
!   std::vector<cmSourceGroup>::iterator iter = this->GroupChildren.begin();
!   std::vector<cmSourceGroup>::iterator end = this->GroupChildren.end();
  
    if(this->MatchesRegex(name))
--- 175,182 ----
  {
    // initializing iterators
!   std::vector<cmSourceGroup>::iterator iter =
!     this->Internal->GroupChildren.begin();
!   std::vector<cmSourceGroup>::iterator end =
!     this->Internal->GroupChildren.end();
  
    if(this->MatchesRegex(name))
***************
*** 155,160 ****
  }
  
! std::vector<cmSourceGroup> cmSourceGroup::GetGroupChildren() const
  {
!   return this->GroupChildren;
  }
--- 195,201 ----
  }
  
! std::vector<cmSourceGroup> const&
! cmSourceGroup::GetGroupChildren() const
  {
!   return this->Internal->GroupChildren;
  }

Index: cmLocalVisualStudio7Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio7Generator.cxx,v
retrieving revision 1.217.2.5
retrieving revision 1.217.2.6
diff -C 2 -d -r1.217.2.5 -r1.217.2.6
*** cmLocalVisualStudio7Generator.cxx	1 May 2008 16:35:39 -0000	1.217.2.5
--- cmLocalVisualStudio7Generator.cxx	23 May 2008 20:09:36 -0000	1.217.2.6
***************
*** 1474,1478 ****
      }
  
!   std::vector<cmSourceGroup> children  = sg->GetGroupChildren();
  
    for(unsigned int i=0;i<children.size();++i)
--- 1474,1478 ----
      }
  
!   std::vector<cmSourceGroup> const& children  = sg->GetGroupChildren();
  
    for(unsigned int i=0;i<children.size();++i)

Index: cmFindBase.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindBase.cxx,v
retrieving revision 1.35.2.1
retrieving revision 1.35.2.2
diff -C 2 -d -r1.35.2.1 -r1.35.2.2
*** cmFindBase.cxx	8 Apr 2008 16:22:49 -0000	1.35.2.1
--- cmFindBase.cxx	23 May 2008 20:09:36 -0000	1.35.2.2
***************
*** 379,388 ****
        dir += "/";
        }
!     dest.push_back(dir + subdir);
      if (subdir == "bin")
        {
        dest.push_back(dir + "sbin");
        }
!     if(!subdir.empty())
        {
        dest.push_back(*it);
--- 379,392 ----
        dir += "/";
        }
!     std::string add = dir + subdir;
!     if(add != "/")
!       {
!       dest.push_back(add);
!       }
      if (subdir == "bin")
        {
        dest.push_back(dir + "sbin");
        }
!     if(!subdir.empty() && *it != "/")
        {
        dest.push_back(*it);

Index: cmLocalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.cxx,v
retrieving revision 1.269.2.2
retrieving revision 1.269.2.3
diff -C 2 -d -r1.269.2.2 -r1.269.2.3
*** cmLocalGenerator.cxx	1 May 2008 16:35:39 -0000	1.269.2.2
--- cmLocalGenerator.cxx	23 May 2008 20:09:36 -0000	1.269.2.3
***************
*** 2777,2790 ****
  
  //----------------------------------------------------------------------------
! static std::string cmLGInfoProp(cmTarget* target, const char* prop)
  {
    if(const char* val = target->GetProperty(prop))
      {
!     return val;
!     }
!   else
!     {
!     // For compatibility check for a variable.
!     return target->GetMakefile()->GetSafeDefinition(prop);
      }
  }
--- 2777,2785 ----
  
  //----------------------------------------------------------------------------
! static void cmLGInfoProp(cmMakefile* mf, cmTarget* target, const char* prop)
  {
    if(const char* val = target->GetProperty(prop))
      {
!     mf->AddDefinition(prop, val);
      }
  }
***************
*** 2795,2859 ****
                                                const char* fname)
  {
!   std::string info_EXECUTABLE_NAME = targetName;
! 
!   // Lookup the properties.
!   std::string info_INFO_STRING =
!     cmLGInfoProp(target, "MACOSX_BUNDLE_INFO_STRING");
!   std::string info_ICON_FILE =
!     cmLGInfoProp(target, "MACOSX_BUNDLE_ICON_FILE");
!   std::string info_GUI_IDENTIFIER =
!     cmLGInfoProp(target, "MACOSX_BUNDLE_GUI_IDENTIFIER");
!   std::string info_LONG_VERSION_STRING =
!     cmLGInfoProp(target, "MACOSX_BUNDLE_LONG_VERSION_STRING");
!   std::string info_BUNDLE_NAME =
!     cmLGInfoProp(target, "MACOSX_BUNDLE_BUNDLE_NAME");
!   std::string info_SHORT_VERSION_STRING =
!     cmLGInfoProp(target, "MACOSX_BUNDLE_SHORT_VERSION_STRING");
!   std::string info_BUNDLE_VERSION =
!     cmLGInfoProp(target, "MACOSX_BUNDLE_BUNDLE_VERSION");
!   std::string info_COPYRIGHT =
!     cmLGInfoProp(target, "MACOSX_BUNDLE_COPYRIGHT");
  
!   // Generate the file.
!   cmGeneratedFileStream fout(fname);
!   fout.SetCopyIfDifferent(true);
!   fout <<
!     "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
!     "<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"\n"
!     "  \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n"
!     "<plist version=\"1.0\">\n"
!     "<dict>\n"
!     "\t<key>CFBundleDevelopmentRegion</key>\n"
!     "\t<string>English</string>\n"
!     "\t<key>CFBundleExecutable</key>\n"
!     "\t<string>" << info_EXECUTABLE_NAME << "</string>\n"
!     "\t<key>CFBundleGetInfoString</key>\n"
!     "\t<string>" << info_INFO_STRING << "</string>\n"
!     "\t<key>CFBundleIconFile</key>\n"
!     "\t<string>" << info_ICON_FILE << "</string>\n"
!     "\t<key>CFBundleIdentifier</key>\n"
!     "\t<string>" << info_GUI_IDENTIFIER << "</string>\n"
!     "\t<key>CFBundleInfoDictionaryVersion</key>\n"
!     "\t<string>6.0</string>\n"
!     "\t<key>CFBundleLongVersionString</key>\n"
!     "\t<string>" << info_LONG_VERSION_STRING << "</string>\n"
!     "\t<key>CFBundleName</key>\n"
!     "\t<string>" << info_BUNDLE_NAME << "</string>\n"
!     "\t<key>CFBundlePackageType</key>\n"
!     "\t<string>APPL</string>\n"
!     "\t<key>CFBundleShortVersionString</key>\n"
!     "\t<string>" << info_SHORT_VERSION_STRING << "</string>\n"
!     "\t<key>CFBundleSignature</key>\n"
!     "\t<string>????" /* break string to avoid trigraph */ "</string>\n"
!     "\t<key>CFBundleVersion</key>\n"
!     "\t<string>" << info_BUNDLE_VERSION << "</string>\n"
!     "\t<key>CSResourcesFileMapped</key>\n"
!     "\t<true/>\n"
!     "\t<key>LSRequiresCarbon</key>\n"
!     "\t<true/>\n"
!     "\t<key>NSHumanReadableCopyright</key>\n"
!     "\t<string>" << info_COPYRIGHT << "</string>\n"
!     "</dict>\n"
!     "</plist>\n"
!     ;
  }
--- 2790,2829 ----
                                                const char* fname)
  {
!   // Find the Info.plist template.
!   const char* in = target->GetProperty("MACOSX_BUNDLE_INFO_PLIST");
!   std::string inFile = (in && *in)? in : "MacOSXBundleInfo.plist.in";
!   if(!cmSystemTools::FileIsFullPath(inFile.c_str()))
!     {
!     std::string inMod = this->Makefile->GetModulesFile(inFile.c_str());
!     if(!inMod.empty())
!       {
!       inFile = inMod;
!       }
!     }
!   if(!cmSystemTools::FileExists(inFile.c_str(), true))
!     {
!     cmOStringStream e;
!     e << "Target " << target->GetName() << " Info.plist template \""
!       << inFile << "\" could not be found.";
!     cmSystemTools::Error(e.str().c_str());
!     return;
!     }
  
!   // Convert target properties to variables in an isolated makefile
!   // scope to configure the file.  If properties are set they will
!   // override user make variables.  If not the configuration will fall
!   // back to the directory-level values set by the user.
!   cmMakefile* mf = this->Makefile;
!   mf->PushScope();
!   mf->AddDefinition("MACOSX_BUNDLE_EXECUTABLE_NAME", targetName);
!   cmLGInfoProp(mf, target, "MACOSX_BUNDLE_INFO_STRING");
!   cmLGInfoProp(mf, target, "MACOSX_BUNDLE_ICON_FILE");
!   cmLGInfoProp(mf, target, "MACOSX_BUNDLE_GUI_IDENTIFIER");
!   cmLGInfoProp(mf, target, "MACOSX_BUNDLE_LONG_VERSION_STRING");
!   cmLGInfoProp(mf, target, "MACOSX_BUNDLE_BUNDLE_NAME");
!   cmLGInfoProp(mf, target, "MACOSX_BUNDLE_SHORT_VERSION_STRING");
!   cmLGInfoProp(mf, target, "MACOSX_BUNDLE_BUNDLE_VERSION");
!   cmLGInfoProp(mf, target, "MACOSX_BUNDLE_COPYRIGHT");
!   mf->ConfigureFile(inFile.c_str(), fname, false, false, false);
!   mf->PopScope();
  }

Index: cmListCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmListCommand.cxx,v
retrieving revision 1.18.2.4
retrieving revision 1.18.2.5
diff -C 2 -d -r1.18.2.4 -r1.18.2.5
*** cmListCommand.cxx	15 May 2008 19:39:55 -0000	1.18.2.4
--- cmListCommand.cxx	23 May 2008 20:09:36 -0000	1.18.2.5
***************
*** 213,223 ****
    std::string value;
    size_t cc;
    for ( cc = 2; cc < args.size()-1; cc ++ )
      {
      int item = atoi(args[cc].c_str());
!     if (value.size())
!       {
!       value += ";";
!       }
      size_t nitem = varArgsExpanded.size();
      if ( item < 0 )
--- 213,222 ----
    std::string value;
    size_t cc;
+   const char* sep = "";
    for ( cc = 2; cc < args.size()-1; cc ++ )
      {
      int item = atoi(args[cc].c_str());
!     value += sep;
!     sep = ";";
      size_t nitem = varArgsExpanded.size();
      if ( item < 0 )
***************
*** 263,267 ****
    for ( cc = 2; cc < args.size(); ++ cc )
      {
!     if ( listString.size() )
        {
        listString += ";";
--- 262,266 ----
    for ( cc = 2; cc < args.size(); ++ cc )
      {
!     if(listString.size())
        {
        listString += ";";
***************
*** 359,369 ****
  
    std::string value;
    for ( cc = 0; cc < varArgsExpanded.size(); cc ++ )
      {
!     if (value.size())
!       {
!       value += ";";
!       }
      value += varArgsExpanded[cc];
      }
  
--- 358,367 ----
  
    std::string value;
+   const char* sep = "";
    for ( cc = 0; cc < varArgsExpanded.size(); cc ++ )
      {
!     value += sep;
      value += varArgsExpanded[cc];
+     sep = ";";
      }
  
***************
*** 409,419 ****
  
    std::string value;
    for ( cc = 0; cc < varArgsExpanded.size(); cc ++ )
      {
!     if (value.size())
!       {
!       value += ";";
!       }
      value += varArgsExpanded[cc];
      }
  
--- 407,416 ----
  
    std::string value;
+   const char* sep = "";
    for ( cc = 0; cc < varArgsExpanded.size(); cc ++ )
      {
!     value += sep;
      value += varArgsExpanded[cc];
+     sep = ";";
      }
  
***************
*** 443,453 ****
    std::string value;
    std::vector<std::string>::reverse_iterator it;
    for ( it = varArgsExpanded.rbegin(); it != varArgsExpanded.rend(); ++ it )
      {
!     if (value.size())
!       {
!       value += ";";
!       }
      value += it->c_str();
      }
  
--- 440,449 ----
    std::string value;
    std::vector<std::string>::reverse_iterator it;
+   const char* sep = "";
    for ( it = varArgsExpanded.rbegin(); it != varArgsExpanded.rend(); ++ it )
      {
!     value += sep;
      value += it->c_str();
+     sep = ";";
      }
  
***************
*** 479,502 ****
    std::string value;
  
- #if 0 
-   // Fast version, but does not keep the ordering
- 
-   std::set<std::string> unique(varArgsExpanded.begin(), varArgsExpanded.end());
-   std::set<std::string>::iterator it;
-   for ( it = unique.begin(); it != unique.end(); ++ it )
-     {
-     if (value.size())
-       {
-       value += ";";
-       }
-     value += it->c_str();
-     }
- 
- #else
- 
-   // Slower version, keep the ordering
  
    std::set<std::string> unique;
    std::vector<std::string>::iterator it;
    for ( it = varArgsExpanded.begin(); it != varArgsExpanded.end(); ++ it )
      {
--- 475,482 ----
    std::string value;
  
  
    std::set<std::string> unique;
    std::vector<std::string>::iterator it;
+   const char* sep = "";
    for ( it = varArgsExpanded.begin(); it != varArgsExpanded.end(); ++ it )
      {
***************
*** 506,517 ****
        }
      unique.insert(*it);
! 
!     if (value.size())
!       {
!       value += ";";
!       }
      value += it->c_str();
      }
- #endif
  
  
--- 486,493 ----
        }
      unique.insert(*it);
!     value += sep;
      value += it->c_str();
+     sep = ";";
      }
  
  
***************
*** 543,559 ****
    std::string value;
    std::vector<std::string>::iterator it;
    for ( it = varArgsExpanded.begin(); it != varArgsExpanded.end(); ++ it )
      {
!     if(value.size() == 0 && 
!        this->Makefile->GetPolicyStatus(cmPolicies::CMP0007) ==
!        cmPolicies::NEW)
!       {
!       value += ";";
!       }
!     if (value.size())
!       {
!       value += ";";
!       }
      value += it->c_str();
      }
  
--- 519,528 ----
    std::string value;
    std::vector<std::string>::iterator it;
+   const char* sep = "";
    for ( it = varArgsExpanded.begin(); it != varArgsExpanded.end(); ++ it )
      {
!     value += sep;
      value += it->c_str();
+     sep = ";";
      }
  
***************
*** 605,608 ****
--- 574,578 ----
  
    std::string value;
+   const char* sep = "";
    for ( cc = 0; cc < varArgsExpanded.size(); ++ cc )
      {
***************
*** 619,627 ****
      if ( !found )
        {
!       if (value.size())
!         {
!         value += ";";
!         }
        value += varArgsExpanded[cc];
        }
      }
--- 589,595 ----
      if ( !found )
        {
!       value += sep;
        value += varArgsExpanded[cc];
+       sep = ";";
        }
      }

Index: cmSourceGroup.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSourceGroup.h,v
retrieving revision 1.19
retrieving revision 1.19.12.1
diff -C 2 -d -r1.19 -r1.19.12.1
*** cmSourceGroup.h	15 Mar 2006 16:02:07 -0000	1.19
--- cmSourceGroup.h	23 May 2008 20:09:39 -0000	1.19.12.1
***************
*** 23,26 ****
--- 23,28 ----
  class cmSourceFile;
  
+ class cmSourceGroupInternals;
+ 
  /** \class cmSourceGroup
   * \brief Hold a group of sources as specified by a SOURCE_GROUP command.
***************
*** 37,41 ****
  public:
    cmSourceGroup(const char* name, const char* regex);
!   ~cmSourceGroup() {}
    
    /**
--- 39,45 ----
  public:
    cmSourceGroup(const char* name, const char* regex);
!   cmSourceGroup(cmSourceGroup const& r);
!   ~cmSourceGroup();
!   cmSourceGroup& operator=(cmSourceGroup const&);
    
    /**
***************
*** 98,102 ****
    std::vector<const cmSourceFile*>& GetSourceFiles();
    
!   std::vector<cmSourceGroup> GetGroupChildren() const;
  private:
    /**
--- 102,106 ----
    std::vector<const cmSourceFile*>& GetSourceFiles();
    
!   std::vector<cmSourceGroup> const& GetGroupChildren() const;
  private:
    /**
***************
*** 121,125 ****
    std::vector<const cmSourceFile*> SourceFiles;
  
!   std::vector<cmSourceGroup> GroupChildren;
  };
  
--- 125,129 ----
    std::vector<const cmSourceFile*> SourceFiles;
  
!   cmSourceGroupInternals* Internal;
  };
  

Index: cmLocalVisualStudio6Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio6Generator.cxx,v
retrieving revision 1.141.2.1
retrieving revision 1.141.2.2
diff -C 2 -d -r1.141.2.1 -r1.141.2.2
*** cmLocalVisualStudio6Generator.cxx	23 Apr 2008 02:05:39 -0000	1.141.2.1
--- cmLocalVisualStudio6Generator.cxx	23 May 2008 20:09:36 -0000	1.141.2.2
***************
*** 533,537 ****
      }
  
!   std::vector<cmSourceGroup> children  = sg->GetGroupChildren();
  
    for(unsigned int i=0;i<children.size();++i)
--- 533,537 ----
      }
  
!   std::vector<cmSourceGroup> const& children  = sg->GetGroupChildren();
  
    for(unsigned int i=0;i<children.size();++i)

Index: cmFileCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFileCommand.cxx,v
retrieving revision 1.103.2.3
retrieving revision 1.103.2.4
diff -C 2 -d -r1.103.2.3 -r1.103.2.4
*** cmFileCommand.cxx	1 May 2008 16:35:39 -0000	1.103.2.3
--- cmFileCommand.cxx	23 May 2008 20:09:36 -0000	1.103.2.4
***************
*** 579,583 ****
        // Ignore CR character to make output always have UNIX newlines.
        }
!     else if(c >= 0x20 && c < 0x7F || c == '\t' ||
              (c == '\n' && newline_consume))
        {
--- 579,583 ----
        // Ignore CR character to make output always have UNIX newlines.
        }
!     else if(c >= 0x20 && c < 0x7F || c == '\t' || c == '\f' ||
              (c == '\n' && newline_consume))
        {

Index: cmMakefileTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.cxx,v
retrieving revision 1.93.2.4
retrieving revision 1.93.2.5
diff -C 2 -d -r1.93.2.4 -r1.93.2.5
*** cmMakefileTargetGenerator.cxx	15 May 2008 19:39:57 -0000	1.93.2.4
--- cmMakefileTargetGenerator.cxx	23 May 2008 20:09:38 -0000	1.93.2.5
***************
*** 25,28 ****
--- 25,29 ----
  #include "cmTarget.h"
  #include "cmake.h"
+ #include "cmComputeLinkInformation.h"
  
  #include "cmMakefileExecutableTargetGenerator.h"
***************
*** 1464,1509 ****
      return;
      }
-   // Compute which library configuration to link.
-   cmTarget::LinkLibraryType linkType = cmTarget::OPTIMIZED;
-   if(cmSystemTools::UpperCase(
-        this->LocalGenerator->ConfigurationName.c_str()) == "DEBUG")
-     {
-     linkType = cmTarget::DEBUG;
-     }
-   // Keep track of dependencies already listed.
-   std::set<cmStdString> emitted;
- 
-   // A target should not depend on itself.
-   emitted.insert(this->Target->GetName());
  
    // Loop over all library dependencies.
!   const cmTarget::LinkLibraryVectorType& tlibs =
!     this->Target->GetLinkLibraries();
!   for(cmTarget::LinkLibraryVectorType::const_iterator lib = tlibs.begin();
!       lib != tlibs.end(); ++lib)
      {
!     // skip the library if it is not general and the link type
!     // does not match the current target
!     if(lib->second != cmTarget::GENERAL &&
!        lib->second != linkType)
!       {
!       continue;
!       }
!        
!     // Don't emit the same library twice for this target.
!     if(emitted.insert(lib->first).second)
        {
!       // Depend on other CMake targets.
!       if(cmTarget* tgt =
!          this->GlobalGenerator->FindTarget(0, lib->first.c_str()))
!         {
!         const char* config = this->LocalGenerator->ConfigurationName.c_str();
!         depends.push_back(tgt->GetFullPath(config, false));
!         }
!       // depend on full path libs as well
!       else if(cmSystemTools::FileIsFullPath(lib->first.c_str()))
!         {
!         depends.push_back(lib->first.c_str());
!         }
        }
      }
--- 1465,1478 ----
      return;
      }
  
    // Loop over all library dependencies.
!   const char* cfg = this->LocalGenerator->ConfigurationName.c_str();
!   if(cmComputeLinkInformation* cli = this->Target->GetLinkInformation(cfg))
      {
!     std::vector<std::string> const& libDeps = cli->GetDepends();
!     for(std::vector<std::string>::const_iterator j = libDeps.begin();
!         j != libDeps.end(); ++j)
        {
!       depends.push_back(*j);
        }
      }

Index: cmTarget.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.cxx,v
retrieving revision 1.207.2.6
retrieving revision 1.207.2.7
diff -C 2 -d -r1.207.2.6 -r1.207.2.7
*** cmTarget.cxx	15 May 2008 19:39:57 -0000	1.207.2.6
--- cmTarget.cxx	23 May 2008 20:09:39 -0000	1.207.2.7
***************
*** 548,555 ****
       "on Mac OS X will be created as an application bundle.  "
       "This makes it a GUI executable that can be launched from "
!      "the Finder.\n"
!      "The bundle Info.plist file is generated automatically.  "
!      "The following target properties may be set to specify "
!      "its content:"
       "  MACOSX_BUNDLE_INFO_STRING\n"
       "  MACOSX_BUNDLE_ICON_FILE\n"
--- 548,566 ----
       "on Mac OS X will be created as an application bundle.  "
       "This makes it a GUI executable that can be launched from "
!      "the Finder.  "
!      "See the MACOSX_BUNDLE_INFO_PLIST target property for information "
!      "about creation of the Info.plist file for the application bundle.");
! 
!   cm->DefineProperty
!     ("MACOSX_BUNDLE_INFO_PLIST", cmProperty::TARGET,
!      "Specify a custom Info.plist template for a Mac OS X App Bundle.",
!      "An executable target with MACOSX_BUNDLE enabled will be built as an "
!      "application bundle on Mac OS X.  "
!      "By default its Info.plist file is created by configuring a template "
!      "called MacOSXBundleInfo.plist.in located in the CMAKE_MODULE_PATH.  "
!      "This property specifies an alternative template file name which "
!      "may be a full path.\n"
!      "The following target properties may be set to specify content to "
!      "be configured into the file:\n"
       "  MACOSX_BUNDLE_INFO_STRING\n"
       "  MACOSX_BUNDLE_ICON_FILE\n"
***************
*** 560,564 ****
       "  MACOSX_BUNDLE_BUNDLE_VERSION\n"
       "  MACOSX_BUNDLE_COPYRIGHT\n"
!       );
  
    cm->DefineProperty
--- 571,578 ----
       "  MACOSX_BUNDLE_BUNDLE_VERSION\n"
       "  MACOSX_BUNDLE_COPYRIGHT\n"
!      "CMake variables of the same name may be set to affect all targets "
!      "in a directory that do not have each specific property set.  "
!      "If a custom Info.plist is specified by this property it may of course "
!      "hard-code all the settings instead of using the target properties.");
  
    cm->DefineProperty



More information about the Cmake-commits mailing list