[Cmake-commits] [cmake-commits] hoffman committed cmDependsC.cxx 1.36.2.1 1.36.2.2 cmDocumentVariables.cxx 1.43 1.43.2.1 cmELF.cxx 1.13.2.1 1.13.2.2 cmFileCommand.cxx 1.136.2.1 1.136.2.2 cmFindPackageCommand.cxx 1.62.2.1 1.62.2.2 cmFindPackageCommand.h 1.29.2.1 1.29.2.2 cmGlobalGenerator.cxx 1.257.2.1 1.257.2.2 cmGlobalGenerator.h 1.125.2.1 1.125.2.2 cmGlobalVisualStudio6Generator.cxx 1.78.2.1 1.78.2.2 cmGlobalVisualStudio7Generator.cxx 1.108.2.1 1.108.2.2 cmGlobalVisualStudio7Generator.h 1.51.2.1 1.51.2.2 cmGlobalXCodeGenerator.cxx 1.232.2.1 1.232.2.2 cmHexFileConverter.cxx 1.5.4.1 1.5.4.2 cmIfCommand.cxx 1.97.2.1 1.97.2.2 cmLocalGenerator.cxx 1.315.2.1 1.315.2.2 cmLocalGenerator.h 1.117.2.1 1.117.2.2 cmMakefile.cxx 1.521.2.1 1.521.2.2 cmMakefile.h 1.259.2.1 1.259.2.2 cmMakefileExecutableTargetGenerator.cxx 1.62.2.1 1.62.2.2 cmMakefileLibraryTargetGenerator.cxx 1.78.2.1 1.78.2.2 cmMakefileTargetGenerator.cxx 1.122.2.1 1.122.2.2 cmMakefileTargetGenerator.h 1.31.2.1 1.31.2.2 cmOptionCommand.cxx 1.26.2.1 1.26.2.2 cmPolicies.cxx 1.44.2.1 1.44.2.2 cmPolicies.h 1.26.2.1 1.26.2.2 cmScriptGenerator.cxx 1.1.2.1 1.1.2.2 cmSetCommand.cxx 1.37.2.1 1.37.2.2 cmSetCommand.h 1.23.2.1 1.23.2.2 cmStringCommand.cxx 1.28.2.1 1.28.2.2 cmSystemTools.cxx 1.401.2.1 1.401.2.2 cmTarget.cxx 1.271.2.1 1.271.2.2 cmTarget.h 1.142.2.1 1.142.2.2 cmake.cxx 1.429.2.1 1.429.2.2 cmakewizard.cxx 1.23.14.1 1.23.14.2

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Oct 9 16:11:24 EDT 2009


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

Modified Files:
      Tag: CMake-2-8
	cmDependsC.cxx cmDocumentVariables.cxx cmELF.cxx 
	cmFileCommand.cxx cmFindPackageCommand.cxx 
	cmFindPackageCommand.h cmGlobalGenerator.cxx 
	cmGlobalGenerator.h cmGlobalVisualStudio6Generator.cxx 
	cmGlobalVisualStudio7Generator.cxx 
	cmGlobalVisualStudio7Generator.h cmGlobalXCodeGenerator.cxx 
	cmHexFileConverter.cxx cmIfCommand.cxx cmLocalGenerator.cxx 
	cmLocalGenerator.h cmMakefile.cxx cmMakefile.h 
	cmMakefileExecutableTargetGenerator.cxx 
	cmMakefileLibraryTargetGenerator.cxx 
	cmMakefileTargetGenerator.cxx cmMakefileTargetGenerator.h 
	cmOptionCommand.cxx cmPolicies.cxx cmPolicies.h 
	cmScriptGenerator.cxx cmSetCommand.cxx cmSetCommand.h 
	cmStringCommand.cxx cmSystemTools.cxx cmTarget.cxx cmTarget.h 
	cmake.cxx cmakewizard.cxx 
Log Message:
Merge in changes for RC 3


Index: cmPolicies.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmPolicies.cxx,v
retrieving revision 1.44.2.1
retrieving revision 1.44.2.2
diff -C 2 -d -r1.44.2.1 -r1.44.2.2
*** cmPolicies.cxx	1 Oct 2009 21:21:07 -0000	1.44.2.1
--- cmPolicies.cxx	9 Oct 2009 20:11:19 -0000	1.44.2.2
***************
*** 360,367 ****
      CMP0012, "CMP0012",
      "The if() command can recognize named boolean constants.",
!     "In CMake versions prior to 2.6.5 the only boolean constants were 0 "
      "and 1. Other boolean constants such as true, false, yes, no, "
      "on, off, y, n, notfound, ignore (all case insensitive) were recognized "
!     "in some cases but not all. In later versions of cmake these values are "
      "treated as boolean constants more consistently and should not be used "
      "as variable names. "
--- 360,369 ----
      CMP0012, "CMP0012",
      "The if() command can recognize named boolean constants.",
!     "In CMake versions 2.6.4 and lower the only boolean constants were 0 "
      "and 1. Other boolean constants such as true, false, yes, no, "
      "on, off, y, n, notfound, ignore (all case insensitive) were recognized "
!     "in some cases but not all.  "
!     "For example, the code \"if(TRUE)\" might have evaluated as false.  "
!     "In later versions of cmake these values are "
      "treated as boolean constants more consistently and should not be used "
      "as variable names. "
***************
*** 370,374 ****
      "The NEW behavior for this policy is to treat strings like true as a "
      "boolean constant.",
!     2,6,5, cmPolicies::WARN);
  
      this->DefinePolicy(
--- 372,376 ----
      "The NEW behavior for this policy is to treat strings like true as a "
      "boolean constant.",
!     2,8,0, cmPolicies::WARN);
  
      this->DefinePolicy(
***************
*** 381,385 ****
      "CMake 2.6.4 and above explicitly detect duplicate binary directories.  "
      "CMake 2.6.4 always considers this case an error.  "
!     "In CMake 2.6.5 and above this policy determines whether or not "
      "the case is an error.  "
      "The OLD behavior for this policy is to allow duplicate binary "
--- 383,387 ----
      "CMake 2.6.4 and above explicitly detect duplicate binary directories.  "
      "CMake 2.6.4 always considers this case an error.  "
!     "In CMake 2.8.0 and above this policy determines whether or not "
      "the case is an error.  "
      "The OLD behavior for this policy is to allow duplicate binary "
***************
*** 387,391 ****
      "The NEW behavior for this policy is to disallow duplicate binary "
      "directories with an error.",
!     2,6,5, cmPolicies::WARN);
  
      this->DefinePolicy(
--- 389,393 ----
      "The NEW behavior for this policy is to disallow duplicate binary "
      "directories with an error.",
!     2,8,0, cmPolicies::WARN);
  
      this->DefinePolicy(
***************
*** 400,434 ****
      "The NEW behavior for this policy is to report an error.",
      2,8,0, cmPolicies::WARN);
- 
-     this->DefinePolicy(
-     CMP0015, "CMP0015",
-     "The set() CACHE mode and option() command make the cache value visible.",
-     "In CMake 2.6 and below the CACHE mode of the set() command and the "
-     "option() command did not expose the value from the named cache entry "
-     "if it was already set both in the cache and as a local variable.  "
-     "This led to subtle differences between first and later configurations "
-     "because a conflicting local variable would be overridden only when the "
-     "cache value was first created.  "
-     "For example, the code\n"
-     "  set(x 1)\n"
-     "  set(before ${x})\n"
-     "  set(x 2 CACHE STRING \"X\")\n"
-     "  set(after ${x})\n"
-     "  message(STATUS \"${before},${after}\")\n"
-     "would print \"1,2\" on the first run and \"1,1\" on future runs."
-     "\n"
-     "CMake 2.8.0 and above prefer to expose the cache value in all cases by "
-     "removing the local variable definition, but this changes behavior in "
-     "subtle cases when the local variable has a different value than that "
-     "exposed from the cache.  "
-     "The example above will always print \"1,2\"."
-     "\n"
-     "This policy determines whether the commands should always expose the "
-     "cache value.  "
-     "The OLD behavior for this policy is to leave conflicting local "
-     "variable values untouched and hide the true cache value.  "
-     "The NEW behavior for this policy is to always expose the cache value.",
-     2,8,0, cmPolicies::WARN);
- 
  }
  
--- 402,405 ----

Index: cmIfCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmIfCommand.cxx,v
retrieving revision 1.97.2.1
retrieving revision 1.97.2.2
diff -C 2 -d -r1.97.2.1 -r1.97.2.2
*** cmIfCommand.cxx	1 Oct 2009 21:21:04 -0000	1.97.2.1
--- cmIfCommand.cxx	9 Oct 2009 20:11:14 -0000	1.97.2.2
***************
*** 270,277 ****
          {
          cmPolicies* policies = makefile->GetPolicies();
!         errorString = "You have used a variable or argument named \""
            + newArg
!           + "\" in a conditional statement. Please be aware of issues "
!           + "related to policy CMP0012. "
            + policies->GetPolicyWarning(cmPolicies::CMP0012);
          status = cmake::AUTHOR_WARNING;
--- 270,276 ----
          {
          cmPolicies* policies = makefile->GetPolicies();
!         errorString = "A variable or argument named \""
            + newArg
!           + "\" appears in a conditional statement.  "
            + policies->GetPolicyWarning(cmPolicies::CMP0012);
          status = cmake::AUTHOR_WARNING;
***************
*** 286,293 ****
          {
          cmPolicies* policies = makefile->GetPolicies();
!         errorString = "You have used a variable or argument named \""
            + newArg
!           + "\" in a conditional statement. Please be aware of issues "
!           + "related to policy CMP0012. "
            + policies->GetPolicyWarning(cmPolicies::CMP0012);
          status = cmake::AUTHOR_WARNING;
--- 285,291 ----
          {
          cmPolicies* policies = makefile->GetPolicies();
!         errorString = "A variable or argument named \""
            + newArg
!           + "\" appears in a conditional statement.  "
            + policies->GetPolicyWarning(cmPolicies::CMP0012);
          status = cmake::AUTHOR_WARNING;

Index: cmGlobalGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.h,v
retrieving revision 1.125.2.1
retrieving revision 1.125.2.2
diff -C 2 -d -r1.125.2.1 -r1.125.2.2
*** cmGlobalGenerator.h	1 Oct 2009 21:21:01 -0000	1.125.2.1
--- cmGlobalGenerator.h	9 Oct 2009 20:11:12 -0000	1.125.2.2
***************
*** 266,269 ****
--- 266,270 ----
                               TargetDependSet& originalTargets,
                               cmLocalGenerator* root, GeneratorVector const&);
+   virtual bool IsRootOnlyTarget(cmTarget* target);
    void AddTargetDepends(cmTarget* target, TargetDependSet& projectTargets);
    void SetLanguageEnabledFlag(const char* l, cmMakefile* mf);

Index: cmFindPackageCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindPackageCommand.h,v
retrieving revision 1.29.2.1
retrieving revision 1.29.2.2
diff -C 2 -d -r1.29.2.1 -r1.29.2.2
*** cmFindPackageCommand.h	1 Oct 2009 21:21:00 -0000	1.29.2.1
--- cmFindPackageCommand.h	9 Oct 2009 20:11:12 -0000	1.29.2.2
***************
*** 74,78 ****
    void RestoreFindDefinitions();
    bool HandlePackageMode();
!   void FindConfig();
    bool FindPrefixedConfig();
    bool FindFrameworkConfig();
--- 74,78 ----
    void RestoreFindDefinitions();
    bool HandlePackageMode();
!   bool FindConfig();
    bool FindPrefixedConfig();
    bool FindFrameworkConfig();

Index: cmFindPackageCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindPackageCommand.cxx,v
retrieving revision 1.62.2.1
retrieving revision 1.62.2.2
diff -C 2 -d -r1.62.2.1 -r1.62.2.2
*** cmFindPackageCommand.cxx	1 Oct 2009 21:21:00 -0000	1.62.2.1
--- cmFindPackageCommand.cxx	9 Oct 2009 20:11:12 -0000	1.62.2.2
***************
*** 737,741 ****
  
    // Try to load the config file if the directory is known
!   bool cachedDirectoryOk = false;
    if(!cmSystemTools::IsOff(def))
      {
--- 737,741 ----
  
    // Try to load the config file if the directory is known
!   bool fileFound = false;
    if(!cmSystemTools::IsOff(def))
      {
***************
*** 755,759 ****
        {
        this->FileFound = file;
!       cachedDirectoryOk = true;
        }
      def = this->Makefile->GetDefinition(this->Variable.c_str());
--- 755,759 ----
        {
        this->FileFound = file;
!       fileFound = true;
        }
      def = this->Makefile->GetDefinition(this->Variable.c_str());
***************
*** 761,777 ****
  
    // Search for the config file if it is not already found.
!   if(cmSystemTools::IsOff(def) || !cachedDirectoryOk)
      {
!     this->FindConfig();
      def = this->Makefile->GetDefinition(this->Variable.c_str());
      }
  
    // If the directory for the config file was found, try to read the file.
    bool result = true;
    bool found = false;
!   // in the following test FileFound should never be empty if def is valid
!   // but I don't want to put an assert() in there now, in case this still
!   // makes it into 2.6.3
!   if(!cmSystemTools::IsOff(def) && (!this->FileFound.empty()))
      {
      // Set the version variables before loading the config file.
--- 761,782 ----
  
    // Search for the config file if it is not already found.
!   if(cmSystemTools::IsOff(def) || !fileFound)
      {
!     fileFound = this->FindConfig();
      def = this->Makefile->GetDefinition(this->Variable.c_str());
      }
  
+   // Sanity check.
+   if(fileFound && this->FileFound.empty())
+     {
+     this->Makefile->IssueMessage(
+       cmake::INTERNAL_ERROR, "fileFound is true but FileFound is empty!");
+     fileFound = false;
+     }
+ 
    // If the directory for the config file was found, try to read the file.
    bool result = true;
    bool found = false;
!   if(fileFound)
      {
      // Set the version variables before loading the config file.
***************
*** 887,891 ****
  
  //----------------------------------------------------------------------------
! void cmFindPackageCommand::FindConfig()
  {
    // Compute the set of search prefixes.
--- 892,896 ----
  
  //----------------------------------------------------------------------------
! bool cmFindPackageCommand::FindConfig()
  {
    // Compute the set of search prefixes.
***************
*** 939,945 ****
    help += this->Name;
    help += ".";
    this->Makefile->AddCacheDefinition(this->Variable.c_str(),
                                       init.c_str(), help.c_str(),
!                                      cmCacheManager::PATH);
  }
  
--- 944,952 ----
    help += this->Name;
    help += ".";
+   // We force the value since we do not get here if it was already set.
    this->Makefile->AddCacheDefinition(this->Variable.c_str(),
                                       init.c_str(), help.c_str(),
!                                      cmCacheManager::PATH, true);
!   return found;
  }
  

Index: cmSystemTools.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSystemTools.cxx,v
retrieving revision 1.401.2.1
retrieving revision 1.401.2.2
diff -C 2 -d -r1.401.2.1 -r1.401.2.2
*** cmSystemTools.cxx	1 Oct 2009 21:21:08 -0000	1.401.2.1
--- cmSystemTools.cxx	9 Oct 2009 20:11:19 -0000	1.401.2.2
***************
*** 339,343 ****
        c != v.end(); c++)
      {
!     *c = toupper(*c);
      }
    return (v == "ON" || v == "1" || v == "YES" || v == "TRUE" || v == "Y");
--- 339,343 ----
        c != v.end(); c++)
      {
!     *c = static_cast<char>(toupper(*c));
      }
    return (v == "ON" || v == "1" || v == "YES" || v == "TRUE" || v == "Y");
***************
*** 372,376 ****
        c != v.end(); c++)
      {
!     *c = toupper(*c);
      }
    return (v == "OFF" || v == "0" || v == "NO" || v == "FALSE" || 
--- 372,376 ----
        c != v.end(); c++)
      {
!     *c = static_cast<char>(toupper(*c));
      }
    return (v == "OFF" || v == "0" || v == "NO" || v == "FALSE" || 
***************
*** 916,920 ****
      return false;
      }
!   fgets(buffer, BUFFER_SIZE, cpipe);
    while(!feof(cpipe))
      {
--- 916,923 ----
      return false;
      }
!   if (!fgets(buffer, BUFFER_SIZE, cpipe))
!     {
!     buffer[0] = 0;
!     }
    while(!feof(cpipe))
      {
***************
*** 924,929 ****
        }
      output += buffer;
!     buffer[0] = 0;
!     fgets(buffer, BUFFER_SIZE, cpipe);
      }
  
--- 927,934 ----
        }
      output += buffer;
!     if(!fgets(buffer, BUFFER_SIZE, cpipe))
!       {
!       buffer[0] = 0;
!       }
      }
  

Index: cmMakefileLibraryTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileLibraryTargetGenerator.cxx,v
retrieving revision 1.78.2.1
retrieving revision 1.78.2.2
diff -C 2 -d -r1.78.2.1 -r1.78.2.2
*** cmMakefileLibraryTargetGenerator.cxx	1 Oct 2009 21:21:06 -0000	1.78.2.1
--- cmMakefileLibraryTargetGenerator.cxx	9 Oct 2009 20:11:18 -0000	1.78.2.2
***************
*** 114,117 ****
--- 114,123 ----
    linkRuleVar += "_CREATE_STATIC_LIBRARY";
  
+   if(this->GetFeatureAsBool("INTERPROCEDURAL_OPTIMIZATION") &&
+      this->Makefile->GetDefinition((linkRuleVar+"_IPO").c_str()))
+     {
+     linkRuleVar += "_IPO";
+     }
+ 
    std::string extraFlags;
    this->LocalGenerator->AppendFlags
***************
*** 672,678 ****
        }
      }
    std::string langFlags;
!   this->LocalGenerator
!     ->AddLanguageFlags(langFlags, linkLanguage, this->ConfigName);
    // remove any language flags that might not work with the
    // particular os
--- 678,686 ----
        }
      }
+ 
+   // Add language feature flags.
    std::string langFlags;
!   this->AddFeatureFlags(langFlags, linkLanguage);
! 
    // remove any language flags that might not work with the
    // particular os

Index: cmTarget.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.h,v
retrieving revision 1.142.2.1
retrieving revision 1.142.2.2
diff -C 2 -d -r1.142.2.1 -r1.142.2.2
*** cmTarget.h	1 Oct 2009 21:21:09 -0000	1.142.2.1
--- cmTarget.h	9 Oct 2009 20:11:21 -0000	1.142.2.2
***************
*** 184,190 ****
                        LinkLibraryType llt);
  
-   void AddLinkLibrary(const std::string& lib,
-                       LinkLibraryType llt);
- 
    void MergeLinkLibraries( cmMakefile& mf, const char* selfname,
                             const LinkLibraryVectorType& libs );
--- 184,187 ----
***************
*** 223,227 ****
    std::set<cmStdString>const& GetUtilities() const { return this->Utilities; }
  
!   void AnalyzeLibDependencies( const cmMakefile& mf );
  
    ///! Set/Get a property of this target file
--- 220,225 ----
    std::set<cmStdString>const& GetUtilities() const { return this->Utilities; }
  
!   /** Finalize the target at the end of the Configure step.  */
!   void FinishConfigure();
  
    ///! Set/Get a property of this target file
***************
*** 233,236 ****
--- 231,236 ----
    void CheckProperty(const char* prop, cmMakefile* context);
  
+   const char* GetFeature(const char* feature, const char* config);
+ 
    bool IsImported() const {return this->IsImportedTarget;}
  
***************
*** 491,494 ****
--- 491,496 ----
                             DependencyMap& dep_map);
  
+   void AnalyzeLibDependencies( const cmMakefile& mf );
+ 
    const char* GetSuffixVariableInternal(bool implib);
    const char* GetPrefixVariableInternal(bool implib);
***************
*** 566,569 ****
--- 568,575 ----
    void ComputeLinkClosure(const char* config, LinkClosure& lc);
  
+   void ClearLinkMaps();
+ 
+   void MaybeInvalidatePropertyCache(const char* prop);
+ 
    // The cmMakefile instance that owns this target.  This should
    // always be set.

Index: cmMakefileTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.cxx,v
retrieving revision 1.122.2.1
retrieving revision 1.122.2.2
diff -C 2 -d -r1.122.2.1 -r1.122.2.2
*** cmMakefileTargetGenerator.cxx	1 Oct 2009 21:21:06 -0000	1.122.2.1
--- cmMakefileTargetGenerator.cxx	9 Oct 2009 20:11:19 -0000	1.122.2.2
***************
*** 292,299 ****
        (defines, this->Target->GetProperty(defPropName.c_str()), lang);
  
!     // Add language-specific flags.
!     this->LocalGenerator
!       ->AddLanguageFlags(flags, lang,
!                          this->LocalGenerator->ConfigurationName.c_str());
  
      // Fortran-specific flags computed for this target.
--- 292,297 ----
        (defines, this->Target->GetProperty(defPropName.c_str()), lang);
  
!     // Add language feature flags.
!     this->AddFeatureFlags(flags, lang);
  
      // Fortran-specific flags computed for this target.
***************
*** 579,585 ****
                               cmLocalGenerator::NONE,
                               cmLocalGenerator::SHELL);
-   std::string objectFile = this->Convert(obj.c_str(),
-                                          cmLocalGenerator::START_OUTPUT,
-                                          cmLocalGenerator::SHELL);
  
    // Construct the build message.
--- 577,580 ----
***************
*** 1763,1764 ****
--- 1758,1785 ----
    this->LocalGenerator->AppendFlags(flags, flag.c_str());
  }
+ 
+ //----------------------------------------------------------------------------
+ const char* cmMakefileTargetGenerator::GetFeature(const char* feature)
+ {
+   return this->Target->GetFeature(feature, this->ConfigName);
+ }
+ 
+ //----------------------------------------------------------------------------
+ bool cmMakefileTargetGenerator::GetFeatureAsBool(const char* feature)
+ {
+   return cmSystemTools::IsOn(this->GetFeature(feature));
+ }
+ 
+ //----------------------------------------------------------------------------
+ void cmMakefileTargetGenerator::AddFeatureFlags(
+   std::string& flags, const char* lang
+   )
+ {
+   // Add language-specific flags.
+   this->LocalGenerator->AddLanguageFlags(flags, lang, this->ConfigName);
+ 
+   if(this->GetFeatureAsBool("INTERPROCEDURAL_OPTIMIZATION"))
+     {
+     this->LocalGenerator->AppendFeatureOptions(flags, lang, "IPO");
+     }
+ }

Index: cmTarget.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.cxx,v
retrieving revision 1.271.2.1
retrieving revision 1.271.2.2
diff -C 2 -d -r1.271.2.1 -r1.271.2.2
*** cmTarget.cxx	1 Oct 2009 21:21:08 -0000	1.271.2.1
--- cmTarget.cxx	9 Oct 2009 20:11:19 -0000	1.271.2.2
***************
*** 56,59 ****
--- 56,66 ----
      this->SourceFileFlagsConstructed = false;
      }
+   cmTargetInternals(cmTargetInternals const& r)
+     {
+     this->SourceFileFlagsConstructed = false;
+     // Only some of these entries are part of the object state.
+     // Others not copied here are result caches.
+     this->SourceEntries = r.SourceEntries;
+     }
    typedef cmTarget::SourceFileFlags SourceFileFlags;
    std::map<cmSourceFile const*, SourceFileFlags> SourceFlagsMap;
***************
*** 422,425 ****
--- 429,445 ----
  
    cm->DefineProperty
+     ("INTERPROCEDURAL_OPTIMIZATION", cmProperty::TARGET,
+      "Enable interprocedural optimization for a target.",
+      "If set to true, enables interprocedural optimizations "
+      "if they are known to be supported by the compiler.");
+ 
+   cm->DefineProperty
+     ("INTERPROCEDURAL_OPTIMIZATION_<CONFIG>", cmProperty::TARGET,
+      "Per-configuration interprocedural optimization for a target.",
+      "This is a per-configuration version of INTERPROCEDURAL_OPTIMIZATION.  "
+      "If set, this property overrides the generic property "
+      "for the named configuration.");
+ 
+   cm->DefineProperty
      ("LABELS", cmProperty::TARGET,
       "Specify a list of text labels associated with a target.",
***************
*** 1016,1019 ****
--- 1036,1060 ----
  
  //----------------------------------------------------------------------------
+ void cmTarget::FinishConfigure()
+ {
+   // Erase any cached link information that might have been comptued
+   // on-demand during the configuration.  This ensures that build
+   // system generation uses up-to-date information even if other cache
+   // invalidation code in this source file is buggy.
+   this->ClearLinkMaps();
+ 
+   // Do old-style link dependency analysis.
+   this->AnalyzeLibDependencies(*this->Makefile);
+ }
+ 
+ //----------------------------------------------------------------------------
+ void cmTarget::ClearLinkMaps()
+ {
+   this->Internal->LinkImplMap.clear();
+   this->Internal->LinkInterfaceMap.clear();
+   this->Internal->LinkClosureMap.clear();
+ }
+ 
+ //----------------------------------------------------------------------------
  cmListFileBacktrace const& cmTarget::GetBacktrace() const
  {
***************
*** 1594,1609 ****
  
  //----------------------------------------------------------------------------
- void cmTarget::AddLinkLibrary(const std::string& lib,
-                               LinkLibraryType llt)
- {
-   this->AddFramework(lib.c_str(), llt);
-   cmTarget::LibraryID tmp;
-   tmp.first = lib;
-   tmp.second = llt;
-   this->LinkLibraries.push_back(tmp);
-   this->OriginalLinkLibraries.push_back(tmp);
- }
- 
- //----------------------------------------------------------------------------
  bool cmTarget::NameResolvesToFramework(const std::string& libname)
  {
--- 1635,1638 ----
***************
*** 1649,1652 ****
--- 1678,1682 ----
    this->LinkLibraries.push_back( tmp );
    this->OriginalLinkLibraries.push_back(tmp);
+   this->ClearLinkMaps();
  
    // Add the explicit dependency information for this target. This is
***************
*** 1994,2004 ****
  
    this->Properties.SetProperty(prop, value, cmProperty::TARGET);
! 
!   // If imported information is being set, wipe out cached
!   // information.
!   if(this->IsImported() && strncmp(prop, "IMPORTED", 8) == 0)
!     {
!     this->Internal->ImportInfoMap.clear();
!     }
  }
  
--- 2024,2028 ----
  
    this->Properties.SetProperty(prop, value, cmProperty::TARGET);
!   this->MaybeInvalidatePropertyCache(prop);
  }
  
***************
*** 2011,2021 ****
      }
    this->Properties.AppendProperty(prop, value, cmProperty::TARGET);
  
!   // If imported information is being set, wipe out cached
!   // information.
    if(this->IsImported() && strncmp(prop, "IMPORTED", 8) == 0)
      {
      this->Internal->ImportInfoMap.clear();
      }
  }
  
--- 2035,2053 ----
      }
    this->Properties.AppendProperty(prop, value, cmProperty::TARGET);
+   this->MaybeInvalidatePropertyCache(prop);
+ }
  
! //----------------------------------------------------------------------------
! void cmTarget::MaybeInvalidatePropertyCache(const char* prop)
! {
!   // Wipe wipe out maps caching information affected by this property.
    if(this->IsImported() && strncmp(prop, "IMPORTED", 8) == 0)
      {
      this->Internal->ImportInfoMap.clear();
      }
+   if(!this->IsImported() && strncmp(prop, "LINK_INTERFACE_", 15) == 0)
+     {
+     this->ClearLinkMaps();
+     }
  }
  
***************
*** 2246,2249 ****
--- 2278,2301 ----
  
  //----------------------------------------------------------------------------
+ const char* cmTarget::GetFeature(const char* feature, const char* config)
+ {
+   if(config && *config)
+     {
+     std::string featureConfig = feature;
+     featureConfig += "_";
+     featureConfig += cmSystemTools::UpperCase(config);
+     if(const char* value = this->GetProperty(featureConfig.c_str()))
+       {
+       return value;
+       }
+     }
+   if(const char* value = this->GetProperty(feature))
+     {
+     return value;
+     }
+   return this->Makefile->GetFeature(feature, config);
+ }
+ 
+ //----------------------------------------------------------------------------
  const char *cmTarget::GetProperty(const char* prop)
  {
***************
*** 4310,4319 ****
  //----------------------------------------------------------------------------
  cmTargetInternalPointer
! ::cmTargetInternalPointer(cmTargetInternalPointer const&)
  {
    // Ideally cmTarget instances should never be copied.  However until
    // we can make a sweep to remove that, this copy constructor avoids
    // allowing the resources (Internals) to be copied.
!   this->Pointer = new cmTargetInternals;
  }
  
--- 4362,4371 ----
  //----------------------------------------------------------------------------
  cmTargetInternalPointer
! ::cmTargetInternalPointer(cmTargetInternalPointer const& r)
  {
    // Ideally cmTarget instances should never be copied.  However until
    // we can make a sweep to remove that, this copy constructor avoids
    // allowing the resources (Internals) to be copied.
!   this->Pointer = new cmTargetInternals(*r.Pointer);
  }
  
***************
*** 4333,4337 ****
    // allowing the resources (Internals) to be copied.
    cmTargetInternals* oldPointer = this->Pointer;
!   this->Pointer = new cmTargetInternals;
    delete oldPointer;
    return *this;
--- 4385,4389 ----
    // allowing the resources (Internals) to be copied.
    cmTargetInternals* oldPointer = this->Pointer;
!   this->Pointer = new cmTargetInternals(*r.Pointer);
    delete oldPointer;
    return *this;

Index: cmGlobalXCodeGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalXCodeGenerator.cxx,v
retrieving revision 1.232.2.1
retrieving revision 1.232.2.2
diff -C 2 -d -r1.232.2.1 -r1.232.2.2
*** cmGlobalXCodeGenerator.cxx	1 Oct 2009 21:21:04 -0000	1.232.2.1
--- cmGlobalXCodeGenerator.cxx	9 Oct 2009 20:11:13 -0000	1.232.2.2
***************
*** 2647,2662 ****
        osxArch = "$(ARCHS_STANDARD_32_64_BIT)";
        }
!     else if(this->XcodeVersion <= 25)
        {
- #ifdef __i386
-       osxArch = "i386";
- #endif
  #ifdef __ppc__
        osxArch = "ppc";
  #endif
!       }
!     else
!       {
!       osxArch = "$(ARCHS_STANDARD_32_BIT)";
        }
      buildSettings->AddAttribute("ONLY_ACTIVE_ARCH",
--- 2647,2662 ----
        osxArch = "$(ARCHS_STANDARD_32_64_BIT)";
        }
!     else if(this->XcodeVersion == 31)
!       {
!       osxArch = "$(ARCHS_STANDARD_32_BIT)";
!       }
!     else if(this->XcodeVersion <= 30)
        {
  #ifdef __ppc__
        osxArch = "ppc";
  #endif
! #ifdef __i386
!       osxArch = "i386";
! #endif
        }
      buildSettings->AddAttribute("ONLY_ACTIVE_ARCH",

Index: cmake.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.cxx,v
retrieving revision 1.429.2.1
retrieving revision 1.429.2.2
diff -C 2 -d -r1.429.2.1 -r1.429.2.2
*** cmake.cxx	1 Oct 2009 21:21:10 -0000	1.429.2.1
--- cmake.cxx	9 Oct 2009 20:11:21 -0000	1.429.2.2
***************
*** 1277,1281 ****
        if (countFile)
          {
!         fscanf(countFile,"%i",&count);
          fclose(countFile);
          }
--- 1277,1284 ----
        if (countFile)
          {
!         if (1!=fscanf(countFile,"%i",&count))
!           {
!           cmSystemTools::Message("Could not read from count file.");
!           }
          fclose(countFile);
          }
***************
*** 1319,1323 ****
        else
          {
!         fscanf(progFile,"%i",&count);
          fclose(progFile);
          }
--- 1322,1329 ----
        else
          {
!         if (1!=fscanf(progFile,"%i",&count))
!           {
!           cmSystemTools::Message("Could not read from progress file.");
!           }
          fclose(progFile);
          }
***************
*** 1470,1474 ****
        std::string startOutDir;
        std::string depInfo;
!       bool color = true;
        if(args.size() >= 8)
          {
--- 1476,1480 ----
        std::string startOutDir;
        std::string depInfo;
!       bool color = false;
        if(args.size() >= 8)
          {
***************
*** 1488,1496 ****
          depInfo = args[7];
          if(args.size() >= 9 &&
!            args[8].length() > 8 &&
             args[8].substr(0, 8) == "--color=")
            {
            // Enable or disable color based on the switch value.
!           color = cmSystemTools::IsOn(args[8].substr(8).c_str());
            }
          }
--- 1494,1503 ----
          depInfo = args[7];
          if(args.size() >= 9 &&
!            args[8].length() >= 8 &&
             args[8].substr(0, 8) == "--color=")
            {
            // Enable or disable color based on the switch value.
!           color = (args[8].size() == 8 ||
!                    cmSystemTools::IsOn(args[8].substr(8).c_str()));
            }
          }

Index: cmStringCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmStringCommand.cxx,v
retrieving revision 1.28.2.1
retrieving revision 1.28.2.2
diff -C 2 -d -r1.28.2.1 -r1.28.2.2
*** cmStringCommand.cxx	1 Oct 2009 21:21:08 -0000	1.28.2.1
--- cmStringCommand.cxx	9 Oct 2009 20:11:19 -0000	1.28.2.2
***************
*** 382,386 ****
          std::string e = "sub-command REGEX, mode REPLACE: Unknown escape \"";
          e += replace.substr(r, 2);
!         e += "\"in replace-expression.";
          this->SetError(e.c_str());
          return false;
--- 382,386 ----
          std::string e = "sub-command REGEX, mode REPLACE: Unknown escape \"";
          e += replace.substr(r, 2);
!         e += "\" in replace-expression.";
          this->SetError(e.c_str());
          return false;
***************
*** 560,564 ****
    if(args.size() < 5)
      {
!     this->SetError("sub-command REPLACE requires four arguments.");
      return false;
      }
--- 560,564 ----
    if(args.size() < 5)
      {
!     this->SetError("sub-command REPLACE requires at least four arguments.");
      return false;
      }
***************
*** 587,591 ****
    if(args.size() != 5)
      {
!     this->SetError("sub-command REPLACE requires four arguments.");
      return false;
      }
--- 587,591 ----
    if(args.size() != 5)
      {
!     this->SetError("sub-command SUBSTRING requires four arguments.");
      return false;
      }
***************
*** 648,652 ****
   if(args.size() != 3)
      {
!     this->SetError("sub-command LENGTH requires two arguments.");
      return false;
      }
--- 648,652 ----
   if(args.size() != 3)
      {
!     this->SetError("sub-command STRIP requires two arguments.");
      return false;
      }

Index: cmGlobalVisualStudio7Generator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudio7Generator.h,v
retrieving revision 1.51.2.1
retrieving revision 1.51.2.2
diff -C 2 -d -r1.51.2.1 -r1.51.2.2
*** cmGlobalVisualStudio7Generator.h	1 Oct 2009 21:21:03 -0000	1.51.2.1
--- cmGlobalVisualStudio7Generator.h	9 Oct 2009 20:11:13 -0000	1.51.2.2
***************
*** 134,137 ****
--- 134,138 ----
    std::string ConvertToSolutionPath(const char* path);
  
+   virtual bool IsRootOnlyTarget(cmTarget* target);
    bool IsPartOfDefaultBuild(const char* project,
                              cmTarget* target);

Index: cmMakefileExecutableTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileExecutableTargetGenerator.cxx,v
retrieving revision 1.62.2.1
retrieving revision 1.62.2.2
diff -C 2 -d -r1.62.2.1 -r1.62.2.2
*** cmMakefileExecutableTargetGenerator.cxx	1 Oct 2009 21:21:06 -0000	1.62.2.1
--- cmMakefileExecutableTargetGenerator.cxx	9 Oct 2009 20:11:15 -0000	1.62.2.2
***************
*** 200,208 ****
    std::string linkFlags;
  
-   // Add flags to deal with shared libraries.  Any library being
-   // linked in might be shared, so always use shared flags for an
-   // executable.
-   this->LocalGenerator->AddSharedFlags(linkFlags, linkLanguage, true);
- 
    // Add flags to create an executable.
    this->LocalGenerator->
--- 200,203 ----
***************
*** 232,238 ****
      }
  
!   // Add language-specific flags.
!   this->LocalGenerator
!     ->AddLanguageFlags(flags, linkLanguage, this->ConfigName);
  
    // Add target-specific linker flags.
--- 227,232 ----
      }
  
!   // Add language feature flags.
!   this->AddFeatureFlags(flags, linkLanguage);
  
    // Add target-specific linker flags.

Index: cmSetCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSetCommand.cxx,v
retrieving revision 1.37.2.1
retrieving revision 1.37.2.2
diff -C 2 -d -r1.37.2.1 -r1.37.2.2
*** cmSetCommand.cxx	1 Oct 2009 21:21:08 -0000	1.37.2.1
--- cmSetCommand.cxx	9 Oct 2009 20:11:19 -0000	1.37.2.2
***************
*** 156,160 ****
      if(cache && type != cmCacheManager::INTERNAL && !force)
        {
-       this->Makefile->UseCacheDefinition(it);
        return true;
        }
--- 156,159 ----

Index: cmMakefile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefile.cxx,v
retrieving revision 1.521.2.1
retrieving revision 1.521.2.2
diff -C 2 -d -r1.521.2.1 -r1.521.2.2
*** cmMakefile.cxx	1 Oct 2009 21:21:06 -0000	1.521.2.1
--- cmMakefile.cxx	9 Oct 2009 20:11:14 -0000	1.521.2.2
***************
*** 811,815 ****
         l != this->Targets.end(); l++)
      {
!     l->second.AnalyzeLibDependencies(*this);
      }
  }
--- 811,815 ----
         l != this->Targets.end(); l++)
      {
!     l->second.FinishConfigure();
      }
  }
***************
*** 1643,1697 ****
  }
  
- //----------------------------------------------------------------------------
- void cmMakefile::UseCacheDefinition(cmCacheManager::CacheIterator const& it)
- {
-   // Check for a local definition that might hide the cache value.
-   const char* name = it.GetName();
-   const char* def = this->Internal->VarStack.top().Get(name);
-   if(!def)
-     {
-     return;
-     }
- 
-   // If the visible value will change then check policy CMP0015.
-   const char* cache = it.GetValue();
-   if(strcmp(def, cache) != 0)
-     {
-     cmOStringStream e;
-     switch (this->GetPolicyStatus(cmPolicies::CMP0015))
-       {
-       case cmPolicies::WARN:
-         e << "Local variable \"" << name << "\" is set to\n"
-           << "  " << def << "\n"
-           << "but the CACHE entry of the same name is set to\n"
-           << "  " << cache << "\n"
-           << "The local variable is hiding the cache value."
-           << "\n"
-           << this->GetPolicies()->GetPolicyWarning(cmPolicies::CMP0015);
-         this->IssueMessage(cmake::AUTHOR_WARNING, e.str());
-       case cmPolicies::OLD:
-         // OLD behavior is to leave local definition.
-         return;
-       case cmPolicies::REQUIRED_IF_USED:
-       case cmPolicies::REQUIRED_ALWAYS:
-         e << "Local variable \"" << name << "\" is set to\n"
-           << "  " << def << "\n"
-           << "but the CACHE entry of the same name is set to\n"
-           << "  " << cache << "\n"
-           << "This command is removing the local variable to expose "
-           << "the cache value."
-           << "\n"
-           << this->GetPolicies()->GetRequiredPolicyError(cmPolicies::CMP0015);
-         this->IssueMessage(cmake::FATAL_ERROR, e.str());
-       case cmPolicies::NEW:
-         // NEW behavior is to remove local definition (done below).
-         break;
-       }
-     }
- 
-   // Remove the local definition to make the cache value visible.
-   this->RemoveDefinition(name);
- }
- 
  
  void cmMakefile::AddCacheDefinition(const char* name, const char* value,
--- 1643,1646 ----
***************
*** 1720,1724 ****
        for ( cc = 0; cc < files.size(); cc ++ )
          {
!         files[cc] = cmSystemTools::CollapseFullPath(files[cc].c_str());
          if ( cc > 0 )
            {
--- 1669,1676 ----
        for ( cc = 0; cc < files.size(); cc ++ )
          {
!         if(!cmSystemTools::IsOff(files[cc].c_str()))
!           {
!           files[cc] = cmSystemTools::CollapseFullPath(files[cc].c_str());
!           }
          if ( cc > 0 )
            {
***************
*** 3312,3315 ****
--- 3264,3292 ----
  }
  
+ //----------------------------------------------------------------------------
+ const char* cmMakefile::GetFeature(const char* feature, const char* config)
+ {
+   // TODO: Define accumulation policy for features (prepend, append, replace).
+   // Currently we always replace.
+   if(config && *config)
+     {
+     std::string featureConfig = feature;
+     featureConfig += "_";
+     featureConfig += cmSystemTools::UpperCase(config);
+     if(const char* value = this->GetProperty(featureConfig.c_str()))
+       {
+       return value;
+       }
+     }
+   if(const char* value = this->GetProperty(feature))
+     {
+     return value;
+     }
+   if(cmLocalGenerator* parent = this->LocalGenerator->GetParent())
+     {
+     return parent->GetMakefile()->GetFeature(feature, config);
+     }
+   return 0;
+ }
  
  cmTarget* cmMakefile::FindTarget(const char* name)
***************
*** 3531,3534 ****
--- 3508,3524 ----
  
    cm->DefineProperty
+     ("INTERPROCEDURAL_OPTIMIZATION", cmProperty::DIRECTORY,
+      "Enable interprocedural optimization for targets in a directory.",
+      "If set to true, enables interprocedural optimizations "
+      "if they are known to be supported by the compiler.");
+ 
+   cm->DefineProperty
+     ("INTERPROCEDURAL_OPTIMIZATION_<CONFIG>", cmProperty::DIRECTORY,
+      "Per-configuration interprocedural optimization for a directory.",
+      "This is a per-configuration version of INTERPROCEDURAL_OPTIMIZATION.  "
+      "If set, this property overrides the generic property "
+      "for the named configuration.");
+ 
+   cm->DefineProperty
      ("VARIABLES", cmProperty::DIRECTORY,
       "List of variables defined in the current directory.",

Index: cmLocalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.cxx,v
retrieving revision 1.315.2.1
retrieving revision 1.315.2.2
diff -C 2 -d -r1.315.2.1 -r1.315.2.2
*** cmLocalGenerator.cxx	1 Oct 2009 21:21:05 -0000	1.315.2.1
--- cmLocalGenerator.cxx	9 Oct 2009 20:11:14 -0000	1.315.2.2
***************
*** 1952,1964 ****
      this->AppendFlags(flags, this->Makefile->GetDefinition(flagsVar.c_str()));
      }
- 
-   // Add flags specific to shared builds.
-   if(cmSystemTools::IsOn(this->Makefile->GetDefinition("BUILD_SHARED_LIBS")))
-     {
-     flagsVar = "CMAKE_SHARED_BUILD_";
-     flagsVar += lang;
-     flagsVar += "_FLAGS";
-     this->AppendFlags(flags, this->Makefile->GetDefinition(flagsVar.c_str()));
-     }
  }
  
--- 1952,1955 ----
***************
*** 2084,2087 ****
--- 2075,2098 ----
  
  //----------------------------------------------------------------------------
+ void cmLocalGenerator::AppendFeatureOptions(
+   std::string& flags, const char* lang, const char* feature)
+ {
+   std::string optVar = "CMAKE_";
+   optVar += lang;
+   optVar += "_COMPILE_OPTIONS_";
+   optVar += feature;
+   if(const char* optionList = this->Makefile->GetDefinition(optVar.c_str()))
+     {
+     std::vector<std::string> options;
+     cmSystemTools::ExpandListArgument(optionList, options);
+     for(std::vector<std::string>::const_iterator oi = options.begin();
+         oi != options.end(); ++oi)
+       {
+       this->AppendFlags(flags, this->EscapeForShell(oi->c_str()).c_str());
+       }
+     }
+ }
+ 
+ //----------------------------------------------------------------------------
  std::string
  cmLocalGenerator::ConstructComment(const cmCustomCommand& cc,

Index: cmGlobalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.cxx,v
retrieving revision 1.257.2.1
retrieving revision 1.257.2.2
diff -C 2 -d -r1.257.2.1 -r1.257.2.2
*** cmGlobalGenerator.cxx	1 Oct 2009 21:21:01 -0000	1.257.2.1
--- cmGlobalGenerator.cxx	9 Oct 2009 20:11:12 -0000	1.257.2.2
***************
*** 1954,1957 ****
--- 1954,1962 ----
        {
        cmTarget* target = &l->second;
+       if(this->IsRootOnlyTarget(target) &&
+          target->GetMakefile() != root->GetMakefile())
+         {
+         continue;
+         }
        // put the target in the set of original targets
        originalTargets.insert(target);
***************
*** 1963,1966 ****
--- 1968,1978 ----
  
  //----------------------------------------------------------------------------
+ bool cmGlobalGenerator::IsRootOnlyTarget(cmTarget* target)
+ {
+   return (target->GetType() == cmTarget::GLOBAL_TARGET ||
+           strcmp(target->GetName(), this->GetAllTargetName()) == 0);
+ }
+ 
+ //----------------------------------------------------------------------------
  void cmGlobalGenerator::AddTargetDepends(cmTarget* target,
                                           TargetDependSet& projectTargets)

Index: cmDependsC.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDependsC.cxx,v
retrieving revision 1.36.2.1
retrieving revision 1.36.2.2
diff -C 2 -d -r1.36.2.1 -r1.36.2.2
*** cmDependsC.cxx	1 Oct 2009 21:20:47 -0000	1.36.2.1
--- cmDependsC.cxx	9 Oct 2009 20:11:12 -0000	1.36.2.2
***************
*** 150,157 ****
    std::set<cmStdString> scanned;
  
!   // Use reserve to allocate enough memory for both strings,
    // so that during the loops no memory is allocated or freed
-   std::string cacheKey;
-   cacheKey.reserve(4*1024);
    std::string tempPathStr;
    tempPathStr.reserve(4*1024);
--- 150,155 ----
    std::set<cmStdString> scanned;
  
!   // Use reserve to allocate enough memory for tempPathStr
    // so that during the loops no memory is allocated or freed
    std::string tempPathStr;
    tempPathStr.reserve(4*1024);
***************
*** 182,201 ****
      else
        {
-       // With GCC distribution of STL, assigning to a string directly
-       // throws away the internal buffer of the left-hand-side.  We
-       // want to keep the pre-allocated buffer so we use C-style
-       // string assignment and then operator+=.  We could call
-       // .clear() instead of assigning to an empty string but the
-       // method does not exist on some older compilers.
-       cacheKey = "";
-       cacheKey += current.FileName;
- 
-       for(std::vector<std::string>::const_iterator i = 
-             this->IncludePath.begin(); i != this->IncludePath.end(); ++i)
-         {
-         cacheKey+=*i;
-         }
        std::map<cmStdString, cmStdString>::iterator
!         headerLocationIt=this->HeaderLocationCache.find(cacheKey);
        if (headerLocationIt!=this->HeaderLocationCache.end())
          {
--- 180,185 ----
      else
        {
        std::map<cmStdString, cmStdString>::iterator
!         headerLocationIt=this->HeaderLocationCache.find(current.FileName);
        if (headerLocationIt!=this->HeaderLocationCache.end())
          {
***************
*** 215,221 ****
          else
            {
!             tempPathStr += *i;
!             tempPathStr+="/";
!             tempPathStr+=current.FileName;
            }
  
--- 199,205 ----
          else
            {
!           tempPathStr += *i;
!           tempPathStr+="/";
!           tempPathStr+=current.FileName;
            }
  
***************
*** 223,228 ****
          if(cmSystemTools::FileExists(tempPathStr.c_str(), true))
            {
!             fullName = tempPathStr;
!             HeaderLocationCache[cacheKey]=fullName;
            break;
            }
--- 207,212 ----
          if(cmSystemTools::FileExists(tempPathStr.c_str(), true))
            {
!           fullName = tempPathStr;
!           HeaderLocationCache[current.FileName]=fullName;
            break;
            }

Index: cmFileCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFileCommand.cxx,v
retrieving revision 1.136.2.1
retrieving revision 1.136.2.2
diff -C 2 -d -r1.136.2.1 -r1.136.2.2
*** cmFileCommand.cxx	1 Oct 2009 21:20:59 -0000	1.136.2.1
--- cmFileCommand.cxx	9 Oct 2009 20:11:12 -0000	1.136.2.2
***************
*** 532,535 ****
--- 532,542 ----
      }
  
+   // At least one compiler (Portland Group Fortran) produces binaries
+   // with some extra characters in strings.
+   char extra[256]; // = {}; // some compilers do not like this
+   memset(extra, 0, sizeof(extra));
+   extra[0x0c] = 1; // FF  (form feed)
+   extra[0x14] = 1; // DC4 (device control 4)
+ 
    // Parse strings out of the file.
    int output_size = 0;
***************
*** 586,590 ****
        // Ignore CR character to make output always have UNIX newlines.
        }
!     else if((c >= 0x20 && c < 0x7F) || c == '\t' || c == '\f' ||
              (c == '\n' && newline_consume))
        {
--- 593,597 ----
        // Ignore CR character to make output always have UNIX newlines.
        }
!     else if((c >= 0x20 && c < 0x7F) || c == '\t' || extra[c] ||
              (c == '\n' && newline_consume))
        {

Index: cmScriptGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmScriptGenerator.cxx,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C 2 -d -r1.1.2.1 -r1.1.2.2
*** cmScriptGenerator.cxx	1 Oct 2009 21:21:07 -0000	1.1.2.1
--- cmScriptGenerator.cxx	9 Oct 2009 20:11:19 -0000	1.1.2.2
***************
*** 54,58 ****
        {
        result += "[";
!       result += *c + ('A' - 'a');
        result += *c;
        result += "]";
--- 54,58 ----
        {
        result += "[";
!       result += static_cast<char>(*c + 'A' - 'a');
        result += *c;
        result += "]";
***************
*** 62,66 ****
        result += "[";
        result += *c;
!       result += *c + ('a' - 'A');
        result += "]";
        }
--- 62,66 ----
        result += "[";
        result += *c;
!       result += static_cast<char>(*c + 'a' - 'A');
        result += "]";
        }

Index: cmGlobalVisualStudio6Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudio6Generator.cxx,v
retrieving revision 1.78.2.1
retrieving revision 1.78.2.2
diff -C 2 -d -r1.78.2.1 -r1.78.2.2
*** cmGlobalVisualStudio6Generator.cxx	1 Oct 2009 21:21:03 -0000	1.78.2.1
--- cmGlobalVisualStudio6Generator.cxx	9 Oct 2009 20:11:12 -0000	1.78.2.2
***************
*** 214,238 ****
      else
        {
!       bool skip = false;
!       // if it is a global target or the check build system target
!       // or the all_build target
!       // then only use the one that is for the root
!       if(target->GetType() == cmTarget::GLOBAL_TARGET
!          || !strcmp(target->GetName(), this->GetAllTargetName()))
!         {
!         if(target->GetMakefile() != root->GetMakefile())
!           {
!           skip = true;
!           }
!         }
!       // if not skipping the project then write it into the
!       // solution
!       if(!skip)
!         {
!         std::string dspname = GetVS6TargetName(target->GetName());
!         std::string dir = target->GetMakefile()->GetStartOutputDirectory();
!         dir = root->Convert(dir.c_str(), cmLocalGenerator::START_OUTPUT);
!         this->WriteProject(fout, dspname.c_str(), dir.c_str(), *target);
!         }
        }
      }
--- 214,221 ----
      else
        {
!       std::string dspname = GetVS6TargetName(target->GetName());
!       std::string dir = target->GetMakefile()->GetStartOutputDirectory();
!       dir = root->Convert(dir.c_str(), cmLocalGenerator::START_OUTPUT);
!       this->WriteProject(fout, dspname.c_str(), dir.c_str(), *target);
        }
      }

Index: cmLocalGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.h,v
retrieving revision 1.117.2.1
retrieving revision 1.117.2.2
diff -C 2 -d -r1.117.2.1 -r1.117.2.2
*** cmLocalGenerator.h	1 Oct 2009 21:21:05 -0000	1.117.2.1
--- cmLocalGenerator.h	9 Oct 2009 20:11:14 -0000	1.117.2.2
***************
*** 150,153 ****
--- 150,157 ----
                       const char* lang);
  
+   /** Lookup and append options associated with a particular feature.  */
+   void AppendFeatureOptions(std::string& flags, const char* lang,
+                             const char* feature);
+ 
    /** Translate a dependency as given in CMake code to the name to
        appear in a generated build file.  If the given name is that of

Index: cmakewizard.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmakewizard.cxx,v
retrieving revision 1.23.14.1
retrieving revision 1.23.14.2
diff -C 2 -d -r1.23.14.1 -r1.23.14.2
*** cmakewizard.cxx	1 Oct 2009 21:21:10 -0000	1.23.14.1
--- cmakewizard.cxx	9 Oct 2009 20:11:21 -0000	1.23.14.2
***************
*** 29,34 ****
    printf("New Value (Enter to keep current value): ");
    char buffer[4096];
!   buffer[0] = 0;
!   fgets(buffer, sizeof(buffer)-1, stdin);
  
    if(strlen(buffer) > 0)
--- 29,36 ----
    printf("New Value (Enter to keep current value): ");
    char buffer[4096];
!   if(!fgets(buffer, sizeof(buffer)-1, stdin))
!     {
!     buffer[0] = 0;
!     }
  
    if(strlen(buffer) > 0)
***************
*** 66,71 ****
    printf("Would you like to see advanced options? [No]:");
    char buffer[4096];
!   buffer[0] = 0;
!   fgets(buffer, sizeof(buffer)-1, stdin);
    if(buffer[0])
      {
--- 68,75 ----
    printf("Would you like to see advanced options? [No]:");
    char buffer[4096];
!   if(!fgets(buffer, sizeof(buffer)-1, stdin))
!     {
!     buffer[0] = 0;
!     }
    if(buffer[0])
      {

Index: cmHexFileConverter.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmHexFileConverter.cxx,v
retrieving revision 1.5.4.1
retrieving revision 1.5.4.2
diff -C 2 -d -r1.5.4.1 -r1.5.4.2
*** cmHexFileConverter.cxx	1 Oct 2009 21:21:04 -0000	1.5.4.1
--- cmHexFileConverter.cxx	9 Oct 2009 20:11:14 -0000	1.5.4.2
***************
*** 173,177 ****
      }
  
!   fgets(buf, 1024, inFile);
    fclose(inFile);
    FileType type = Binary;
--- 173,180 ----
      }
  
!   if(!fgets(buf, 1024, inFile))
!     {
!     buf[0] = 0;
!     }
    fclose(inFile);
    FileType type = Binary;

Index: cmGlobalVisualStudio7Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudio7Generator.cxx,v
retrieving revision 1.108.2.1
retrieving revision 1.108.2.2
diff -C 2 -d -r1.108.2.1 -r1.108.2.2
*** cmGlobalVisualStudio7Generator.cxx	1 Oct 2009 21:21:03 -0000	1.108.2.1
--- cmGlobalVisualStudio7Generator.cxx	9 Oct 2009 20:11:13 -0000	1.108.2.2
***************
*** 290,321 ****
      else
        {
!       bool skip = false;
!       // if it is a global target or the check build system target
!       // or the all_build target
!       // then only use the one that is for the root
!       if(target->GetType() == cmTarget::GLOBAL_TARGET
!          || !strcmp(target->GetName(), CMAKE_CHECK_BUILD_SYSTEM_TARGET)
!          || !strcmp(target->GetName(), this->GetAllTargetName()))
          {
!         if(target->GetMakefile() != root->GetMakefile())
!           {
!           skip = true;
!           }
!         }
!       // if not skipping the project then write it into the 
!       // solution
!       if(!skip)
!         { 
!         const char *vcprojName = 
!           target->GetProperty("GENERATOR_FILE_NAME");
!         if(vcprojName)
!           {
!           cmMakefile* tmf = target->GetMakefile();
!           std::string dir = tmf->GetStartOutputDirectory();
!           dir = root->Convert(dir.c_str(), 
!                               cmLocalGenerator::START_OUTPUT);
!           this->WriteProject(fout, vcprojName, dir.c_str(),
!                              *target);
!           }
          }
        }
--- 290,303 ----
      else
        {
!       const char *vcprojName =
!         target->GetProperty("GENERATOR_FILE_NAME");
!       if(vcprojName)
          {
!         cmMakefile* tmf = target->GetMakefile();
!         std::string dir = tmf->GetStartOutputDirectory();
!         dir = root->Convert(dir.c_str(),
!                             cmLocalGenerator::START_OUTPUT);
!         this->WriteProject(fout, vcprojName, dir.c_str(),
!                            *target);
          }
        }
***************
*** 634,637 ****
--- 616,626 ----
  }
  
+ //----------------------------------------------------------------------------
+ bool cmGlobalVisualStudio7Generator::IsRootOnlyTarget(cmTarget* target)
+ {
+   return (this->cmGlobalVisualStudioGenerator::IsRootOnlyTarget(target) ||
+           strcmp(target->GetName(), CMAKE_CHECK_BUILD_SYSTEM_TARGET) == 0);
+ }
+ 
  bool cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild(const char* project,
                                                            cmTarget* target)

Index: cmELF.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmELF.cxx,v
retrieving revision 1.13.2.1
retrieving revision 1.13.2.2
diff -C 2 -d -r1.13.2.1 -r1.13.2.2
*** cmELF.cxx	1 Oct 2009 21:20:58 -0000	1.13.2.1
--- cmELF.cxx	9 Oct 2009 20:11:12 -0000	1.13.2.2
***************
*** 541,545 ****
    // Allocate the dynamic section entries.
    ELF_Shdr const& sec = this->SectionHeaders[this->DynamicSectionIndex];
!   int n = sec.sh_size / sec.sh_entsize;
    this->DynamicSectionEntries.resize(n);
  
--- 541,545 ----
    // Allocate the dynamic section entries.
    ELF_Shdr const& sec = this->SectionHeaders[this->DynamicSectionIndex];
!   int n = static_cast<int>(sec.sh_size / sec.sh_entsize);
    this->DynamicSectionEntries.resize(n);
  
***************
*** 593,597 ****
      }
    ELF_Shdr const& sec = this->SectionHeaders[this->DynamicSectionIndex];
!   return sec.sh_offset + sec.sh_entsize*j;
  }
  
--- 593,597 ----
      }
    ELF_Shdr const& sec = this->SectionHeaders[this->DynamicSectionIndex];
!   return static_cast<unsigned long>(sec.sh_offset + sec.sh_entsize*j);
  }
  

Index: cmPolicies.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmPolicies.h,v
retrieving revision 1.26.2.1
retrieving revision 1.26.2.2
diff -C 2 -d -r1.26.2.1 -r1.26.2.2
*** cmPolicies.h	1 Oct 2009 21:21:07 -0000	1.26.2.1
--- cmPolicies.h	9 Oct 2009 20:11:19 -0000	1.26.2.2
***************
*** 51,55 ****
      CMP0013, // Duplicate binary directories not allowed
      CMP0014, // Input directories must have CMakeLists.txt
-     CMP0015, // set(CACHE) and option() make CACHE value visible
  
      // Always the last entry.  Useful mostly to avoid adding a comma
--- 51,54 ----

Index: cmMakefile.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefile.h,v
retrieving revision 1.259.2.1
retrieving revision 1.259.2.2
diff -C 2 -d -r1.259.2.1 -r1.259.2.2
*** cmMakefile.h	1 Oct 2009 21:21:06 -0000	1.259.2.1
--- cmMakefile.h	9 Oct 2009 20:11:14 -0000	1.259.2.2
***************
*** 287,295 ****
  
    /**
-    * Update the variable scope to make the cache definition visible.
-    */
-   void UseCacheDefinition(cmCacheManager::CacheIterator const& it);
- 
-   /**
     * Add bool variable definition to the build. 
     */
--- 287,290 ----
***************
*** 794,797 ****
--- 789,794 ----
    bool GetPropertyAsBool(const char *prop);
  
+   const char* GetFeature(const char* feature, const char* config);
+ 
    // Get the properties
    cmPropertyMap &GetProperties() { return this->Properties; };

Index: cmSetCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSetCommand.h,v
retrieving revision 1.23.2.1
retrieving revision 1.23.2.2
diff -C 2 -d -r1.23.2.1 -r1.23.2.2
*** cmSetCommand.h	1 Oct 2009 21:21:08 -0000	1.23.2.1
--- cmSetCommand.h	9 Oct 2009 20:11:19 -0000	1.23.2.2
***************
*** 65,72 ****
        "      [[CACHE <type> <docstring> [FORCE]] | PARENT_SCOPE])\n"
        "Within CMake sets <variable> to the value <value>.  <value> is expanded"
!       "  before <variable> is set to it.  If CACHE is present and <variable> "
!       "is not yet in the cache, then <variable> is put in the cache. If it is "
!       "already in the cache, <variable> is assigned the value stored in the "
!       "cache.  If CACHE is present, also <type> and <docstring> are "
        "required. <type> is used by the CMake GUI to choose a widget with "
        "which the user sets a value.  The value for <type> may be one of\n"
--- 65,70 ----
        "      [[CACHE <type> <docstring> [FORCE]] | PARENT_SCOPE])\n"
        "Within CMake sets <variable> to the value <value>.  <value> is expanded"
!       "  before <variable> is set to it.  If CACHE is present, then the "
!       "<variable> is put in the cache. <type> and <docstring> are then "
        "required. <type> is used by the CMake GUI to choose a widget with "
        "which the user sets a value.  The value for <type> may be one of\n"

Index: cmDocumentVariables.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDocumentVariables.cxx,v
retrieving revision 1.43
retrieving revision 1.43.2.1
diff -C 2 -d -r1.43 -r1.43.2.1
*** cmDocumentVariables.cxx	23 Sep 2009 12:48:35 -0000	1.43
--- cmDocumentVariables.cxx	9 Oct 2009 20:11:12 -0000	1.43.2.1
***************
*** 57,61 ****
       "As CMake processes the listfiles in your project this "
       "variable will always be set to the one currently being "
!      "processed. See also CMAKE_PARENT_LIST_FILE.",false,
       "Variables that Provide Information");
  
--- 57,72 ----
       "As CMake processes the listfiles in your project this "
       "variable will always be set to the one currently being "
!      "processed.  "
!      "The value has dynamic scope.  "
!      "When CMake starts processing commands in a source file "
!      "it sets this variable to the location of the file.  "
!      "When CMake finishes processing commands from the file it "
!      "restores the previous value.  "
!      "Therefore the value of the variable inside a macro or "
!      "function is the file invoking the bottom-most entry on "
!      "the call stack, not the file containing the macro or "
!      "function definition."
!      "\n"
!      "See also CMAKE_PARENT_LIST_FILE.",false,
       "Variables that Provide Information");
  

Index: cmMakefileTargetGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.h,v
retrieving revision 1.31.2.1
retrieving revision 1.31.2.2
diff -C 2 -d -r1.31.2.1 -r1.31.2.2
*** cmMakefileTargetGenerator.h	1 Oct 2009 21:21:07 -0000	1.31.2.1
--- cmMakefileTargetGenerator.h	9 Oct 2009 20:11:19 -0000	1.31.2.2
***************
*** 221,224 ****
--- 221,231 ----
    void AddModuleDefinitionFlag(std::string& flags);
  
+   // Add language feature flags.
+   void AddFeatureFlags(std::string& flags, const char* lang);
+ 
+   // Feature query methods.
+   const char* GetFeature(const char* feature);
+   bool GetFeatureAsBool(const char* feature);
+ 
    //==================================================================
    // Convenience routines that do nothing more than forward to

Index: cmOptionCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmOptionCommand.cxx,v
retrieving revision 1.26.2.1
retrieving revision 1.26.2.2
diff -C 2 -d -r1.26.2.1 -r1.26.2.2
*** cmOptionCommand.cxx	1 Oct 2009 21:21:07 -0000	1.26.2.1
--- cmOptionCommand.cxx	9 Oct 2009 20:11:19 -0000	1.26.2.2
***************
*** 54,58 ****
        {
        it.SetProperty("HELPSTRING", args[1].c_str());
-       this->Makefile->UseCacheDefinition(it);
        return true;
        }
--- 54,57 ----



More information about the Cmake-commits mailing list