[Cmake-commits] [cmake-commits] king committed CMakeLists.txt 1.428.2.2 1.428.2.3 cmAddTestCommand.h 1.18.2.1 1.18.2.2 cmBuildCommand.cxx 1.24.4.1 1.24.4.2 cmBuildCommand.h 1.13.4.1 1.13.4.2 cmCTest.cxx 1.370.2.2 1.370.2.3 cmCTest.h 1.121.2.1 1.121.2.2 cmCacheManager.cxx 1.113.2.1 1.113.2.2 cmDependsFortran.cxx 1.49.2.1 1.49.2.2 cmDocumentVariables.cxx 1.43.2.1 1.43.2.2 cmDocumentation.cxx 1.75.2.1 1.75.2.2 cmDocumentation.h 1.35.2.1 1.35.2.2 cmDumpDocumentation.cxx 1.20.4.1 NONE cmExtraCodeBlocksGenerator.cxx 1.28.2.2 1.28.2.3 cmExtraEclipseCDT4Generator.cxx 1.27.2.2 1.27.2.3 cmExtraEclipseCDT4Generator.h 1.11.2.1 1.11.2.2 cmFileCommand.cxx 1.136.2.3 1.136.2.4 cmFindPackageCommand.cxx 1.62.2.2 1.62.2.3 cmGetFilenameComponentCommand.cxx 1.21.2.1 1.21.2.2 cmGlobalGenerator.cxx 1.257.2.2 1.257.2.3 cmGlobalGenerator.h 1.125.2.2 1.125.2.3 cmGlobalJOMMakefileGenerator.cxx NONE 1.1.2.2 cmGlobalJOMMakefileGenerator.h NONE 1.2.2.2 cmGlobalKdevelopGenerator.cxx 1.33.2.1 1.33.2.2 cmGlobalVisualStudio10Generator.cxx 1.2.2.2 1.2.2.3 cmGlobalVisualStudio10Generator.h 1.4.2.1 1.4.2.2 cmGlobalVisualStudio10Win64Generator.cxx 1.1.2.2 1.1.2.3 cmGlobalVisualStudio10Win64Generator.h 1.1.2.2 1.1.2.3 cmGlobalVisualStudio6Generator.cxx 1.78.2.2 1.78.2.3 cmGlobalVisualStudio71Generator.cxx 1.54.2.1 1.54.2.2 cmGlobalVisualStudio7Generator.cxx 1.108.2.3 1.108.2.4 cmGlobalVisualStudio8Generator.cxx 1.39.2.2 1.39.2.3 cmGlobalVisualStudio8Win64Generator.cxx 1.5.4.1 1.5.4.2 cmGlobalVisualStudio8Win64Generator.h 1.3.4.1 1.3.4.2 cmGlobalVisualStudio9Generator.cxx 1.6.4.1 1.6.4.2 cmGlobalVisualStudio9Win64Generator.cxx 1.1.6.1 1.1.6.2 cmGlobalVisualStudio9Win64Generator.h 1.1.6.1 1.1.6.2 cmGlobalVisualStudioGenerator.h 1.11.2.2 1.11.2.3 cmGlobalXCodeGenerator.cxx 1.232.2.5 1.232.2.6 cmGlobalXCodeGenerator.h 1.64.2.1 1.64.2.2 cmIfCommand.cxx 1.97.2.3 1.97.2.4 cmIfCommand.h 1.57.2.2 1.57.2.3 cmInstallTargetGenerator.cxx 1.71.2.1 1.71.2.2 cmInstallTargetGenerator.h 1.30.2.1 1.30.2.2 cmLinkDirectoriesCommand.cxx 1.13.4.1 1.13.4.2 cmLinkDirectoriesCommand.h 1.14.2.1 1.14.2.2 cmLocalGenerator.cxx 1.315.2.2 1.315.2.3 cmLocalGenerator.h 1.117.2.2 1.117.2.3 cmLocalVisualStudio6Generator.cxx 1.159.2.1 1.159.2.2 cmLocalVisualStudio6Generator.h 1.24.2.1 1.24.2.2 cmLocalVisualStudio7Generator.cxx 1.252.2.2 1.252.2.3 cmMakefileExecutableTargetGenerator.cxx 1.62.2.2 1.62.2.3 cmMakefileLibraryTargetGenerator.cxx 1.78.2.2 1.78.2.3 cmMakefileTargetGenerator.cxx 1.122.2.2 1.122.2.3 cmPolicies.cxx 1.44.2.3 1.44.2.4 cmPolicies.h 1.26.2.3 1.26.2.4 cmSetTestsPropertiesCommand.h 1.12.2.1 1.12.2.2 cmStandardIncludes.h 1.76.2.2 1.76.2.3 cmSystemTools.cxx 1.401.2.3 1.401.2.4 cmSystemTools.h 1.162.2.1 1.162.2.2 cmTarget.cxx 1.271.2.3 1.271.2.4 cmTarget.h 1.142.2.2 1.142.2.3 cmTest.cxx 1.16.2.1 1.16.2.2 cmVisualStudio10TargetGenerator.cxx 1.15.2.2 1.15.2.3 cmWriteFileCommand.cxx 1.17.2.1 1.17.2.2 cmXMLSafe.cxx 1.5.2.1 1.5.2.2 cm_utf8.c NONE 1.1.2.2 cm_utf8.h NONE 1.1.2.2 cmake.cxx 1.429.2.4 1.429.2.5 cmake.h 1.120.2.1 1.120.2.2 cmakemain.cxx 1.89.2.1 1.89.2.2 ctest.cxx 1.108.2.2 1.108.2.3

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Jan 28 16:48:02 EST 2010


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

Modified Files:
      Tag: CMake-2-8
	CMakeLists.txt cmAddTestCommand.h cmBuildCommand.cxx 
	cmBuildCommand.h cmCTest.cxx cmCTest.h cmCacheManager.cxx 
	cmDependsFortran.cxx cmDocumentVariables.cxx 
	cmDocumentation.cxx cmDocumentation.h 
	cmExtraCodeBlocksGenerator.cxx cmExtraEclipseCDT4Generator.cxx 
	cmExtraEclipseCDT4Generator.h cmFileCommand.cxx 
	cmFindPackageCommand.cxx cmGetFilenameComponentCommand.cxx 
	cmGlobalGenerator.cxx cmGlobalGenerator.h 
	cmGlobalKdevelopGenerator.cxx 
	cmGlobalVisualStudio10Generator.cxx 
	cmGlobalVisualStudio10Generator.h 
	cmGlobalVisualStudio10Win64Generator.cxx 
	cmGlobalVisualStudio10Win64Generator.h 
	cmGlobalVisualStudio6Generator.cxx 
	cmGlobalVisualStudio71Generator.cxx 
	cmGlobalVisualStudio7Generator.cxx 
	cmGlobalVisualStudio8Generator.cxx 
	cmGlobalVisualStudio8Win64Generator.cxx 
	cmGlobalVisualStudio8Win64Generator.h 
	cmGlobalVisualStudio9Generator.cxx 
	cmGlobalVisualStudio9Win64Generator.cxx 
	cmGlobalVisualStudio9Win64Generator.h 
	cmGlobalVisualStudioGenerator.h cmGlobalXCodeGenerator.cxx 
	cmGlobalXCodeGenerator.h cmIfCommand.cxx cmIfCommand.h 
	cmInstallTargetGenerator.cxx cmInstallTargetGenerator.h 
	cmLinkDirectoriesCommand.cxx cmLinkDirectoriesCommand.h 
	cmLocalGenerator.cxx cmLocalGenerator.h 
	cmLocalVisualStudio6Generator.cxx 
	cmLocalVisualStudio6Generator.h 
	cmLocalVisualStudio7Generator.cxx 
	cmMakefileExecutableTargetGenerator.cxx 
	cmMakefileLibraryTargetGenerator.cxx 
	cmMakefileTargetGenerator.cxx cmPolicies.cxx cmPolicies.h 
	cmSetTestsPropertiesCommand.h cmStandardIncludes.h 
	cmSystemTools.cxx cmSystemTools.h cmTarget.cxx cmTarget.h 
	cmTest.cxx cmVisualStudio10TargetGenerator.cxx 
	cmWriteFileCommand.cxx cmXMLSafe.cxx cmake.cxx cmake.h 
	cmakemain.cxx ctest.cxx 
Added Files:
      Tag: CMake-2-8
	cmGlobalJOMMakefileGenerator.cxx 
	cmGlobalJOMMakefileGenerator.h cm_utf8.c cm_utf8.h 
Removed Files:
      Tag: CMake-2-8
	cmDumpDocumentation.cxx 
Log Message:
CMake 2.8.1-rc1


Index: cmDependsFortran.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDependsFortran.cxx,v
retrieving revision 1.49.2.1
retrieving revision 1.49.2.2
diff -C 2 -d -r1.49.2.1 -r1.49.2.2
*** cmDependsFortran.cxx	1 Oct 2009 21:20:50 -0000	1.49.2.1
--- cmDependsFortran.cxx	28 Jan 2010 21:47:49 -0000	1.49.2.2
***************
*** 443,449 ****
        i != info.Includes.end(); ++i)
      {
!     makeDepends << obj << ": "
!        << cmSystemTools::ConvertToOutputPath(i->c_str()).c_str()
!        << std::endl;
      internalDepends << " " << i->c_str() << std::endl;
      }
--- 443,451 ----
        i != info.Includes.end(); ++i)
      {
!     makeDepends << obj << ": " <<
!       this->LocalGenerator->Convert(i->c_str(),
!                                     cmLocalGenerator::HOME_OUTPUT,
!                                     cmLocalGenerator::MAKEFILE)
!                 << std::endl;
      internalDepends << " " << i->c_str() << std::endl;
      }
***************
*** 492,496 ****
          this->LocalGenerator->Convert(required->second.c_str(),
                                        cmLocalGenerator::HOME_OUTPUT,
!                                       cmLocalGenerator::SHELL);
        makeDepends << obj << ": " << stampFile << "\n";
        }
--- 494,498 ----
          this->LocalGenerator->Convert(required->second.c_str(),
                                        cmLocalGenerator::HOME_OUTPUT,
!                                       cmLocalGenerator::MAKEFILE);
        makeDepends << obj << ": " << stampFile << "\n";
        }
***************
*** 505,509 ****
            this->LocalGenerator->Convert(module.c_str(),
                                          cmLocalGenerator::HOME_OUTPUT,
!                                         cmLocalGenerator::SHELL);
          makeDepends << obj << ": " << module << "\n";
          }
--- 507,511 ----
            this->LocalGenerator->Convert(module.c_str(),
                                          cmLocalGenerator::HOME_OUTPUT,
!                                         cmLocalGenerator::MAKEFILE);
          makeDepends << obj << ": " << module << "\n";
          }

Index: cmSystemTools.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSystemTools.h,v
retrieving revision 1.162.2.1
retrieving revision 1.162.2.2
diff -C 2 -d -r1.162.2.1 -r1.162.2.2
*** cmSystemTools.h	1 Oct 2009 21:21:08 -0000	1.162.2.1
--- cmSystemTools.h	28 Jan 2010 21:47:59 -0000	1.162.2.2
***************
*** 269,272 ****
--- 269,283 ----
    };
  
+   enum CompareOp {
+     OP_LESS,
+     OP_GREATER,
+     OP_EQUAL
+   };
+ 
+   /**
+    * Compare versions
+    */
+   static bool VersionCompare(CompareOp op, const char* lhs, const char* rhs);
+ 
    /**
     * Determine the file type based on the extension
***************
*** 348,351 ****
--- 359,376 ----
        was. */
    static void RestoreEnv(const std::vector<std::string>& env);
+ 
+   /** Helper class to save and restore the environment.
+       Instantiate this class as an automatic variable on
+       the stack. Its constructor saves a copy of the current
+       environment and then its destructor restores the
+       original environment. */
+   class SaveRestoreEnvironment
+   {
+   public:
+     SaveRestoreEnvironment();
+     virtual ~SaveRestoreEnvironment();
+   private:
+     std::vector<std::string> Env;
+   };
  #endif
  

Index: cmLinkDirectoriesCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLinkDirectoriesCommand.h,v
retrieving revision 1.14.2.1
retrieving revision 1.14.2.2
diff -C 2 -d -r1.14.2.1 -r1.14.2.2
*** cmLinkDirectoriesCommand.h	1 Oct 2009 21:21:05 -0000	1.14.2.1
--- cmLinkDirectoriesCommand.h	28 Jan 2010 21:47:57 -0000	1.14.2.2
***************
*** 71,74 ****
--- 71,76 ----
    
    cmTypeMacro(cmLinkDirectoriesCommand, cmCommand);
+ private:
+   void AddLinkDir(std::string const& dir);
  };
  

Index: cmPolicies.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmPolicies.cxx,v
retrieving revision 1.44.2.3
retrieving revision 1.44.2.4
diff -C 2 -d -r1.44.2.3 -r1.44.2.4
*** cmPolicies.cxx	28 Oct 2009 16:15:20 -0000	1.44.2.3
--- cmPolicies.cxx	28 Jan 2010 21:47:58 -0000	1.44.2.4
***************
*** 407,410 ****
--- 407,425 ----
      "The NEW behavior for this policy is to report an error.",
      2,8,0, cmPolicies::WARN);
+ 
+     this->DefinePolicy(
+     CMP0015, "CMP0015",
+     "link_directories() treats paths relative to the source dir.",
+     "In CMake 2.6.4 and lower the link_directories() command passed relative "
+     "paths unchanged to the linker.  "
+     "In CMake 2.8.1 and above the link_directories() command prefers to "
+     "interpret relative paths with respect to CMAKE_CURRENT_SOURCE_DIR, "
+     "which is consistent with include_directories() and other commands.  "
+     "The OLD behavior for this policy is to use relative paths verbatim in "
+     "the linker command.  "
+     "The NEW behavior for this policy is to convert relative paths to "
+     "absolute paths by appending the relative path to "
+     "CMAKE_CURRENT_SOURCE_DIR.",
+     2,8,1, cmPolicies::WARN);
  }
  

Index: cmIfCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmIfCommand.cxx,v
retrieving revision 1.97.2.3
retrieving revision 1.97.2.4
diff -C 2 -d -r1.97.2.3 -r1.97.2.4
*** cmIfCommand.cxx	28 Oct 2009 16:15:18 -0000	1.97.2.3
--- cmIfCommand.cxx	28 Jan 2010 21:47:56 -0000	1.97.2.4
***************
*** 526,529 ****
--- 526,536 ----
            reducible, arg, newArgs, argP1, argP2);
          }
+       // does a symlink with this name exist
+       if (*arg == "IS_SYMLINK" && argP1  != newArgs.end())
+         {
+         HandlePredicate(
+           cmSystemTools::FileIsSymlink((argP1)->c_str()),
+           reducible, arg, newArgs, argP1, argP2);
+         }
        // is the given path an absolute path ?
        if (*arg == "IS_ABSOLUTE" && argP1  != newArgs.end())

Index: cmLocalVisualStudio7Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio7Generator.cxx,v
retrieving revision 1.252.2.2
retrieving revision 1.252.2.3
diff -C 2 -d -r1.252.2.2 -r1.252.2.3
*** cmLocalVisualStudio7Generator.cxx	28 Oct 2009 16:15:19 -0000	1.252.2.2
--- cmLocalVisualStudio7Generator.cxx	28 Jan 2010 21:47:57 -0000	1.252.2.3
***************
*** 745,749 ****
      // non-debug configurations because VS still creates .idb files.
      fout <<  "\t\t\t\tProgramDataBaseFileName=\""
!          << target.GetDirectory(configName) << "/"
           << target.GetPDBName(configName) << "\"\n";
      }
--- 745,751 ----
      // non-debug configurations because VS still creates .idb files.
      fout <<  "\t\t\t\tProgramDataBaseFileName=\""
!          << this->ConvertToXMLOutputPathSingle(
!               target.GetDirectory(configName).c_str())
!          << "/"
           << target.GetPDBName(configName) << "\"\n";
      }
***************
*** 1050,1055 ****
      this->OutputLibraryDirectories(fout, cli.GetDirectories());
      fout << "\"\n";
      fout << "\t\t\t\tProgramDataBaseFile=\""
!          << target.GetDirectory(configName) << "/" << targetNamePDB
           << "\"\n";
      if(isDebug)
--- 1052,1059 ----
      this->OutputLibraryDirectories(fout, cli.GetDirectories());
      fout << "\"\n";
+     std::string path = this->ConvertToXMLOutputPathSingle(
+       target.GetDirectory(configName).c_str());
      fout << "\t\t\t\tProgramDataBaseFile=\""
!          << path << "/" << targetNamePDB
           << "\"\n";
      if(isDebug)
***************
*** 1421,1424 ****
--- 1425,1432 ----
          {
          const char* aCompilerTool = "VCCLCompilerTool";
+         if(this->FortranProject)
+           {
+           aCompilerTool = "VFFortranCompilerTool";
+           }
          std::string ext = (*sf)->GetExtension();
          ext = cmSystemTools::LowerCase(ext);

Index: cmake.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.h,v
retrieving revision 1.120.2.1
retrieving revision 1.120.2.2
diff -C 2 -d -r1.120.2.1 -r1.120.2.2
*** cmake.h	1 Oct 2009 21:21:10 -0000	1.120.2.1
--- cmake.h	28 Jan 2010 21:48:00 -0000	1.120.2.2
***************
*** 124,133 ****
  
    /**
-    * Dump documentation to a file. If 0 is returned, the
-    * operation failed.
-    */
-   int DumpDocumentationToFile(std::ostream&);
- 
-   /**
     * Handle a command line invocation of cmake.
     */
--- 124,127 ----
***************
*** 415,418 ****
--- 409,416 ----
    void GenerateGraphViz(const char* fileName) const;
  
+   static int SymlinkLibrary(std::vector<std::string>& args);
+   static int SymlinkExecutable(std::vector<std::string>& args);
+   static bool SymlinkInternal(std::string const& file,
+                               std::string const& link);
    static int ExecuteEchoColor(std::vector<std::string>& args);
    static int ExecuteLinkScript(std::vector<std::string>& args);

Index: cmGlobalGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.h,v
retrieving revision 1.125.2.2
retrieving revision 1.125.2.3
diff -C 2 -d -r1.125.2.2 -r1.125.2.3
*** cmGlobalGenerator.h	9 Oct 2009 20:11:12 -0000	1.125.2.2
--- cmGlobalGenerator.h	28 Jan 2010 21:47:50 -0000	1.125.2.3
***************
*** 259,262 ****
--- 259,266 ----
    virtual void CreateGUID(const char*) {}
  
+   /** Return true if the generated build tree may contain multiple builds.
+       i.e. "Can I build Debug and Release in the same tree?" */
+   virtual bool IsMultiConfig() { return false; }
+ 
  protected:
    typedef std::vector<cmLocalGenerator*> GeneratorVector;

Index: cmGlobalVisualStudio10Win64Generator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudio10Win64Generator.h,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C 2 -d -r1.1.2.2 -r1.1.2.3
*** cmGlobalVisualStudio10Win64Generator.h	28 Oct 2009 16:15:13 -0000	1.1.2.2
--- cmGlobalVisualStudio10Win64Generator.h	28 Jan 2010 21:47:50 -0000	1.1.2.3
***************
*** 31,36 ****
    virtual void GetDocumentation(cmDocumentationEntry& entry) const;
  
!   virtual void EnableLanguage(std::vector<std::string>const& languages,
!                               cmMakefile *, bool optional);
  };
  #endif
--- 31,36 ----
    virtual void GetDocumentation(cmDocumentationEntry& entry) const;
  
!   virtual void AddPlatformDefinitions(cmMakefile* mf);
! 
  };
  #endif

Index: cmSystemTools.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSystemTools.cxx,v
retrieving revision 1.401.2.3
retrieving revision 1.401.2.4
diff -C 2 -d -r1.401.2.3 -r1.401.2.4
*** cmSystemTools.cxx	3 Nov 2009 22:25:02 -0000	1.401.2.3
--- cmSystemTools.cxx	28 Jan 2010 21:47:59 -0000	1.401.2.4
***************
*** 1673,1676 ****
--- 1673,1688 ----
      }
  }
+ 
+ //----------------------------------------------------------------------
+ cmSystemTools::SaveRestoreEnvironment::SaveRestoreEnvironment()
+ {
+   this->Env = cmSystemTools::GetEnvironmentVariables();
+ }
+ 
+ //----------------------------------------------------------------------
+ cmSystemTools::SaveRestoreEnvironment::~SaveRestoreEnvironment()
+ {
+   cmSystemTools::RestoreEnv(this->Env);
+ }
  #endif
  
***************
*** 2592,2595 ****
--- 2604,2634 ----
  
  //----------------------------------------------------------------------------
+ bool cmSystemTools::VersionCompare(cmSystemTools::CompareOp op,
+                                    const char* lhss, const char* rhss)
+ {
+   unsigned int lhs[4] = {0,0,0,0};
+   unsigned int rhs[4] = {0,0,0,0};
+   sscanf(lhss, "%u.%u.%u.%u", &lhs[0], &lhs[1], &lhs[2], &lhs[3]);
+   sscanf(rhss, "%u.%u.%u.%u", &rhs[0], &rhs[1], &rhs[2], &rhs[3]);
+ 
+   // Do component-wise comparison.
+   for(unsigned int i=0; i < 4; ++i)
+     {
+     if(lhs[i] < rhs[i])
+       {
+       // lhs < rhs, so true if operation is LESS
+       return op == cmSystemTools::OP_LESS;
+       }
+     else if(lhs[i] > rhs[i])
+       {
+       // lhs > rhs, so true if operation is GREATER
+         return op == cmSystemTools::OP_GREATER;
+       }
+     }
+   // lhs == rhs, so true if operation is EQUAL
+   return op == cmSystemTools::OP_EQUAL;
+ }
+ 
+ //----------------------------------------------------------------------------
  bool cmSystemTools::RemoveRPath(std::string const& file, std::string* emsg,
                                  bool* removed)

Index: cmMakefileLibraryTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileLibraryTargetGenerator.cxx,v
retrieving revision 1.78.2.2
retrieving revision 1.78.2.3
diff -C 2 -d -r1.78.2.2 -r1.78.2.3
*** cmMakefileLibraryTargetGenerator.cxx	9 Oct 2009 20:11:18 -0000	1.78.2.2
--- cmMakefileLibraryTargetGenerator.cxx	28 Jan 2010 21:47:58 -0000	1.78.2.3
***************
*** 683,686 ****
--- 683,691 ----
    this->AddFeatureFlags(langFlags, linkLanguage);
  
+ #ifdef __APPLE__
+   this->LocalGenerator->AddArchitectureFlags(langFlags, this->Target,
+                                              linkLanguage, this->ConfigName);
+ #endif /* __APPLE__ */
+ 
    // remove any language flags that might not work with the
    // particular os

Index: cmGlobalVisualStudio10Win64Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudio10Win64Generator.cxx,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C 2 -d -r1.1.2.2 -r1.1.2.3
*** cmGlobalVisualStudio10Win64Generator.cxx	28 Oct 2009 16:15:13 -0000	1.1.2.2
--- cmGlobalVisualStudio10Win64Generator.cxx	28 Jan 2010 21:47:50 -0000	1.1.2.3
***************
*** 30,37 ****
  
  //----------------------------------------------------------------------------
! void cmGlobalVisualStudio10Win64Generator::EnableLanguage(
!   std::vector<std::string> const& lang, cmMakefile *mf, bool optional)
  {
    mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE");
!   cmGlobalVisualStudio10Generator::EnableLanguage(lang, mf, optional);
  }
--- 30,39 ----
  
  //----------------------------------------------------------------------------
! void cmGlobalVisualStudio10Win64Generator
! ::AddPlatformDefinitions(cmMakefile* mf)
  {
+   this->cmGlobalVisualStudio10Generator::AddPlatformDefinitions(mf);
    mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE");
!   mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "x64");
!   mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "x64");
  }

Index: cmTarget.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.h,v
retrieving revision 1.142.2.2
retrieving revision 1.142.2.3
diff -C 2 -d -r1.142.2.2 -r1.142.2.3
*** cmTarget.h	9 Oct 2009 20:11:21 -0000	1.142.2.2
--- cmTarget.h	28 Jan 2010 21:47:59 -0000	1.142.2.3
***************
*** 411,414 ****
--- 411,417 ----
    void GetLanguages(std::set<cmStdString>& languages) const;
  
+   /** Get the list of OS X target architectures to be built.  */
+   void GetAppleArchs(const char* config, std::vector<std::string>& archVec);
+ 
    /** Return whether this target is an executable with symbol exports
        enabled.  */

Index: cmGlobalVisualStudio9Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudio9Generator.cxx,v
retrieving revision 1.6.4.1
retrieving revision 1.6.4.2
diff -C 2 -d -r1.6.4.1 -r1.6.4.2
*** cmGlobalVisualStudio9Generator.cxx	1 Oct 2009 21:21:04 -0000	1.6.4.1
--- cmGlobalVisualStudio9Generator.cxx	28 Jan 2010 21:47:56 -0000	1.6.4.2
***************
*** 26,29 ****
--- 26,31 ----
  void cmGlobalVisualStudio9Generator::AddPlatformDefinitions(cmMakefile* mf)
  {
+   mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "X86");
+   mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "X86");
    mf->AddDefinition("MSVC90", "1");
  }

--- NEW FILE: cmGlobalJOMMakefileGenerator.cxx ---
/*============================================================================
  CMake - Cross Platform Makefile Generator
  Copyright 2000-2009 Kitware, Inc., Insight Software Consortium

  Distributed under the OSI-approved BSD License (the "License");
  see accompanying file Copyright.txt for details.

  This software is distributed WITHOUT ANY WARRANTY; without even the
  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  See the License for more information.
============================================================================*/
#include "cmGlobalJOMMakefileGenerator.h"
#include "cmLocalUnixMakefileGenerator3.h"
#include "cmMakefile.h"

cmGlobalJOMMakefileGenerator::cmGlobalJOMMakefileGenerator()
{
  this->FindMakeProgramFile = "CMakeJOMFindMake.cmake";
  this->ForceUnixPaths = false;
  this->ToolSupportsColor = true;
  this->UseLinkScript = false;
}

void cmGlobalJOMMakefileGenerator
::EnableLanguage(std::vector<std::string>const& l, 
                 cmMakefile *mf, 
                 bool optional)
{
  // pick a default 
  mf->AddDefinition("CMAKE_GENERATOR_CC", "cl");
  mf->AddDefinition("CMAKE_GENERATOR_CXX", "cl");
  if(!(cmSystemTools::GetEnv("INCLUDE") && 
       cmSystemTools::GetEnv("LIB"))
    )
    {
    std::string message = "To use the JOM generator, cmake must be run "
      "from a shell that can use the compiler cl from the command line. "
      "This environment does not contain INCLUDE, LIB, or LIBPATH, and "
      "these must be set for the cl compiler to work. ";
    mf->IssueMessage(cmake::WARNING,
                     message);
    }
  
  this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional);
}

///! Create a local generator appropriate to this Global Generator
cmLocalGenerator *cmGlobalJOMMakefileGenerator::CreateLocalGenerator()
{
  cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3;
  lg->SetDefineWindowsNULL(true);
  lg->SetWindowsShell(true);
  lg->SetMakeSilentFlag("/nologo");
  lg->SetGlobalGenerator(this);
  lg->SetIgnoreLibPrefix(true);
  lg->SetPassMakeflags(true);
  lg->SetNMake(true);
  lg->SetUnixCD(false);
  return lg;
}

//----------------------------------------------------------------------------
void cmGlobalJOMMakefileGenerator
::GetDocumentation(cmDocumentationEntry& entry) const
{
  entry.Name = this->GetName();
  entry.Brief = "Generates JOM makefiles.";
  entry.Full = "";
}

Index: cmMakefileTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.cxx,v
retrieving revision 1.122.2.2
retrieving revision 1.122.2.3
diff -C 2 -d -r1.122.2.2 -r1.122.2.3
*** cmMakefileTargetGenerator.cxx	9 Oct 2009 20:11:19 -0000	1.122.2.2
--- cmMakefileTargetGenerator.cxx	28 Jan 2010 21:47:58 -0000	1.122.2.3
***************
*** 295,298 ****
--- 295,303 ----
      this->AddFeatureFlags(flags, lang);
  
+ #ifdef __APPLE__
+     this->LocalGenerator->AddArchitectureFlags(flags, this->Target,
+                                                lang, this->ConfigName);
+ #endif /* __APPLE__ */
+ 
      // Fortran-specific flags computed for this target.
      if(*l == "Fortran")

Index: cmBuildCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmBuildCommand.h,v
retrieving revision 1.13.4.1
retrieving revision 1.13.4.2
diff -C 2 -d -r1.13.4.1 -r1.13.4.2
*** cmBuildCommand.h	1 Oct 2009 21:20:36 -0000	1.13.4.1
--- cmBuildCommand.h	28 Jan 2010 21:47:49 -0000	1.13.4.2
***************
*** 39,46 ****
  
    /**
     * The name of the command as specified in CMakeList.txt.
     */
    virtual const char* GetName() {return "build_command";}
!   
    /**
     * Succinct documentation.
--- 39,56 ----
  
    /**
+    * The primary command signature with optional, KEYWORD-based args.
+    */
+   virtual bool MainSignature(std::vector<std::string> const& args);
+ 
+   /**
+    * Legacy "exactly 2 args required" signature.
+    */
+   virtual bool TwoArgsSignature(std::vector<std::string> const& args);
+ 
+   /**
     * The name of the command as specified in CMakeList.txt.
     */
    virtual const char* GetName() {return "build_command";}
! 
    /**
     * Succinct documentation.
***************
*** 48,54 ****
    virtual const char* GetTerseDocumentation() 
      {
!     return "Get the command line that will build this project.";
      }
!   
    /**
     * More documentation.
--- 58,64 ----
    virtual const char* GetTerseDocumentation() 
      {
!     return "Get the command line to build this project.";
      }
! 
    /**
     * More documentation.
***************
*** 57,72 ****
      {
      return
!       "  build_command(<variable> <makecommand>)\n"
!       "Sets the given <variable> to a string containing the command that "
!       "will build this project from the root of the build tree using the "
!       "build tool given by <makecommand>.  <makecommand> should be msdev, "
!       "nmake, make or one of the end user build tools.  "
!       "This is useful for configuring testing systems.";
      }
!   
    cmTypeMacro(cmBuildCommand, cmCommand);
  };
  
- 
- 
  #endif
--- 67,97 ----
      {
      return
!       "  build_command(<variable>\n"
!       "                [CONFIGURATION <config>]\n"
!       "                [PROJECT_NAME <projname>]\n"
!       "                [TARGET <target>])\n"
!       "Sets the given <variable> to a string containing the command line "
!       "for building one configuration of a target in a project using the "
!       "build tool appropriate for the current CMAKE_GENERATOR.\n"
!       "If CONFIGURATION is omitted, CMake chooses a reasonable default "
!       "value  for multi-configuration generators.  CONFIGURATION is "
!       "ignored for single-configuration generators.\n"
!       "If PROJECT_NAME is omitted, the resulting command line will build "
!       "the top level PROJECT in the current build tree.\n"
!       "If TARGET is omitted, the resulting command line will build "
!       "everything, effectively using build target 'all' or 'ALL_BUILD'.\n"
!       "  build_command(<cachevariable> <makecommand>)\n"
!       "This second signature is deprecated, but still available for "
!       "backwards compatibility. Use the first signature instead.\n"
!       "Sets the given <cachevariable> to a string containing the command "
!       "to build this project from the root of the build tree using "
!       "the build tool given by <makecommand>.  <makecommand> should be "
!       "the full path to msdev, devenv, nmake, make or one of the end "
!       "user build tools."
!       ;
      }
! 
    cmTypeMacro(cmBuildCommand, cmCommand);
  };
  
  #endif

Index: cmCTest.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCTest.h,v
retrieving revision 1.121.2.1
retrieving revision 1.121.2.2
diff -C 2 -d -r1.121.2.1 -r1.121.2.2
*** cmCTest.h	1 Oct 2009 21:20:36 -0000	1.121.2.1
--- cmCTest.h	28 Jan 2010 21:47:49 -0000	1.121.2.2
***************
*** 24,27 ****
--- 24,28 ----
  class cmCTestCommand;
  class cmCTestScriptHandler;
+ class cmCTestStartCommand;
  
  #define cmCTestLog(ctSelf, logType, msg) \
***************
*** 80,83 ****
--- 81,99 ----
      std::string Name;
    };
+ #ifdef CMAKE_BUILD_WITH_CMAKE
+   enum HTTPMethod {
+     HTTP_GET,
+     HTTP_POST,
+     HTTP_PUT
+   };
+ 
+   /**
+    * Perform an HTTP request.
+    */
+   static int HTTPRequest(std::string url, HTTPMethod method,
+                           std::string& response,
+                           std::string fields = "", 
+                           std::string putFile = "", int timeout = 0);
+ #endif
  
    /** Get a testing part id from its string name.  Returns PartCount
***************
*** 94,100 ****
     * Initialize and finalize testing
     */
!   int Initialize(const char* binary_dir, bool new_tag = false,
!     bool verbose_tag = true);
!   bool InitializeFromCommand(cmCTestCommand* command, bool first = false);
    void Finalize();
  
--- 110,114 ----
     * Initialize and finalize testing
     */
!   bool InitializeFromCommand(cmCTestStartCommand* command);
    void Finalize();
  
***************
*** 131,134 ****
--- 145,151 ----
    double GetTimeOut() { return this->TimeOut; }
    void SetTimeOut(double t) { this->TimeOut = t; }
+ 
+   double GetGlobalTimeout() { return this->GlobalTimeout; }
+ 
    // how many test to run at the same time
    int GetParallelLevel() { return this->ParallelLevel; }
***************
*** 192,195 ****
--- 209,221 ----
    bool GetShowOnly();
  
+   bool ShouldUseHTTP10() { return this->UseHTTP10; }
+ 
+   bool ShouldCompressTestOutput();
+ 
+   std::string GetCDashVersion();
+ 
+   //Used for parallel ctest job scheduling
+   std::string GetScheduleType() { return this->ScheduleType; }
+   void SetScheduleType(std::string type) { this->ScheduleType = type; }
  
    ///! The max output width
***************
*** 375,383 ****
  private:
    std::string ConfigType;
    bool Verbose;
    bool ExtraVerbose;
    bool ProduceXML;
    bool LabelSummary;
! 
    bool Failover;
    bool BatchJobs;
--- 401,410 ----
  private:
    std::string ConfigType;
+   std::string ScheduleType;
    bool Verbose;
    bool ExtraVerbose;
    bool ProduceXML;
    bool LabelSummary;
!   bool UseHTTP10;
    bool Failover;
    bool BatchJobs;
***************
*** 387,390 ****
--- 414,420 ----
    bool RunConfigurationScript;
  
+   //flag for lazy getter (optimization)
+   bool ComputedCompressOutput;
+ 
    int GenerateNotesFile(const char* files);
  
***************
*** 417,420 ****
--- 447,452 ----
    double                  TimeOut;
  
+   double                  GlobalTimeout;
+ 
    int                     MaxTestNameWidth;
  
***************
*** 437,440 ****
--- 469,474 ----
    bool                     CompressXMLFiles;
  
+   bool                     CompressTestOutput;
+ 
    void InitStreams();
    std::ostream* StreamOut;
***************
*** 443,446 ****
--- 477,489 ----
    void BlockTestErrorDiagnostics();
  
+   /**
+    * Initialize a dashboard run in the given build tree.  The "command"
+    * argument is non-NULL when running from a command-driven (ctest_start)
+    * dashboard script, and NULL when running from the CTest command
+    * line.  Note that a declarative dashboard script does not actually
+    * call this method because it sets CTEST_COMMAND to drive a build
+    * through the ctest command line.
+    */
+   int Initialize(const char* binary_dir, cmCTestStartCommand* command);
  
    //! parse the option after -D and convert it into the appropriate steps

Index: cmLocalGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.h,v
retrieving revision 1.117.2.2
retrieving revision 1.117.2.3
diff -C 2 -d -r1.117.2.2 -r1.117.2.3
*** cmLocalGenerator.h	9 Oct 2009 20:11:14 -0000	1.117.2.2
--- cmLocalGenerator.h	28 Jan 2010 21:47:57 -0000	1.117.2.3
***************
*** 134,137 ****
--- 134,142 ----
      
  
+ #ifdef __APPLE__
+   void AddArchitectureFlags(std::string& flags, cmTarget* target,
+                             const char *lang, const char* config);
+ #endif /* __APPLE__ */
+ 
    void AddLanguageFlags(std::string& flags, const char* lang,
                          const char* config);

Index: cmExtraEclipseCDT4Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmExtraEclipseCDT4Generator.cxx,v
retrieving revision 1.27.2.2
retrieving revision 1.27.2.3
diff -C 2 -d -r1.27.2.2 -r1.27.2.3
*** cmExtraEclipseCDT4Generator.cxx	28 Oct 2009 16:15:10 -0000	1.27.2.2
--- cmExtraEclipseCDT4Generator.cxx	28 Jan 2010 21:47:49 -0000	1.27.2.3
***************
*** 125,132 ****
  }
  
  //----------------------------------------------------------------------------
  void cmExtraEclipseCDT4Generator::CreateProjectFile()
  {
!   const cmMakefile* mf
      = this->GlobalGenerator->GetLocalGenerators()[0]->GetMakefile();
  
--- 125,194 ----
  }
  
+ 
+ //----------------------------------------------------------------------------
+ void cmExtraEclipseCDT4Generator::AddEnvVar(cmGeneratedFileStream& fout,
+                                             const char* envVar, cmMakefile* mf)
+ {
+   // get the variables from the environment and from the cache and then 
+   // figure out which one to use:
+ 
+   const char* envVarValue = getenv(envVar);
+ 
+   std::string cacheEntryName = "CMAKE_ECLIPSE_ENVVAR_";
+   cacheEntryName += envVar;
+   const char* cacheValue = mf->GetCacheManager()->GetCacheValue(
+                                                        cacheEntryName.c_str());
+ 
+   // now we have both, decide which one to use
+   std::string valueToUse;
+   if (envVarValue==0 && cacheValue==0)
+     {
+     // nothing known, do nothing
+     valueToUse = "";
+     }
+   else if (envVarValue!=0 && cacheValue==0)
+     {
+     // The variable is in the env, but not in the cache. Use it and put it 
+     // in the cache
+     valueToUse = envVarValue;
+     mf->AddCacheDefinition(cacheEntryName.c_str(), valueToUse.c_str(),
+                            cacheEntryName.c_str(), cmCacheManager::STRING,
+                            true);
+     mf->GetCacheManager()->SaveCache(mf->GetHomeOutputDirectory());
+     }
+   else if (envVarValue==0 && cacheValue!=0)
+     {
+     // It is already in the cache, but not in the env, so use it from the cache
+     valueToUse = cacheValue;
+     }
+   else
+     {
+     // It is both in the cache and in the env.
+     // Use the version from the env. except if the value from the env is
+     // completely contained in the value from the cache (for the case that we
+     // now have a PATH without MSVC dirs in the env. but had the full PATH with
+     // all MSVC dirs during the cmake run which stored the var in the cache:
+     valueToUse = cacheValue;
+     if (valueToUse.find(envVarValue) == std::string::npos)
+       {
+       valueToUse = envVarValue;
+       mf->AddCacheDefinition(cacheEntryName.c_str(), valueToUse.c_str(),
+                              cacheEntryName.c_str(), cmCacheManager::STRING,
+                              true);
+       mf->GetCacheManager()->SaveCache(mf->GetHomeOutputDirectory());
+       }
+     }
+ 
+   if (!valueToUse.empty())
+     {
+     fout << envVar << "=" << valueToUse << "|";
+     }
+ }
+ 
+ 
  //----------------------------------------------------------------------------
  void cmExtraEclipseCDT4Generator::CreateProjectFile()
  {
!   cmMakefile* mf
      = this->GlobalGenerator->GetLocalGenerators()[0]->GetMakefile();
  
***************
*** 139,142 ****
--- 201,210 ----
      }
  
+   std::string compilerId = mf->GetSafeDefinition("CMAKE_C_COMPILER_ID");
+   if (compilerId.empty())  // no C compiler, try the C++ compiler:
+     {
+     compilerId = mf->GetSafeDefinition("CMAKE_CXX_COMPILER_ID");
+     }
+ 
    fout << 
      "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
***************
*** 215,241 ****
      "\t\t\t\t<dictionary>\n"
      "\t\t\t\t\t<key>org.eclipse.cdt.make.core.environment</key>\n"
!     "\t\t\t\t\t<value>VERBOSE=1|</value>\n"  // enforce VERBOSE Makefile output
!     "\t\t\t\t\t<value>"
      ;
    // set vsvars32.bat environment available at CMake time,
    //   but not necessarily when eclipse is open
!   if (make.find("nmake") != std::string::npos)
      {
!     if (getenv("PATH"))
!       {
!       fout << "PATH=" << getenv("PATH") << "|";
!       }
!     if (getenv("INCLUDE"))
!       {
!       fout << "INCLUDE=" << getenv("INCLUDE") << "|";
!       }
!     if (getenv("LIB"))
!       {
!       fout << "LIB=" << getenv("LIB") << "|";
!       }
!     if (getenv("LIBPATH"))
!       {
!       fout << "LIBPATH=" << getenv("LIBPATH") << "|";
!       }
      }
    fout <<
--- 283,304 ----
      "\t\t\t\t<dictionary>\n"
      "\t\t\t\t\t<key>org.eclipse.cdt.make.core.environment</key>\n"
!     "\t\t\t\t\t<value>VERBOSE=1|CMAKE_NO_VERBOSE=1|"  //verbose Makefile output
      ;
    // set vsvars32.bat environment available at CMake time,
    //   but not necessarily when eclipse is open
!   if (compilerId == "MSVC")
      {
!     AddEnvVar(fout, "PATH", mf);
!     AddEnvVar(fout, "INCLUDE", mf);
!     AddEnvVar(fout, "LIB", mf);
!     AddEnvVar(fout, "LIBPATH", mf);
!     AddEnvVar(fout, "INCLUDE", mf);
!     }
!   else if (compilerId == "Intel")
!     {
!     // if the env.var is set, use this one and put it in the cache
!     // if the env.var is not set, but the value is in the cache, 
!     // use it from the cache:
!     AddEnvVar(fout, "INTEL_LICENSE_FILE", mf);
      }
    fout <<
***************
*** 286,293 ****
      "\t\t\t\t\t<value>"
      ;
!   if (this->GetToolChainType(*mf) == EclipseToolchainOther)
      {
      fout << "org.eclipse.cdt.core.VCErrorParser;";
      }
    fout <<
      "org.eclipse.cdt.core.MakeErrorParser;"
--- 349,360 ----
      "\t\t\t\t\t<value>"
      ;
!   if (compilerId == "MSVC")
      {
      fout << "org.eclipse.cdt.core.VCErrorParser;";
      }
+   else if (compilerId == "Intel")
+     {
+     fout << "org.eclipse.cdt.core.ICCErrorParser;";
+     }
    fout <<
      "org.eclipse.cdt.core.MakeErrorParser;"
***************
*** 419,436 ****
      ;
    // TODO: refactor this out...
!   switch (this->GetToolChainType(*mf))
!   {
!     case EclipseToolchainLinux   :
!       fout << "<extension id=\"org.eclipse.cdt.core.ELF\""
!               " point=\"org.eclipse.cdt.core.BinaryParser\"/>\n"
!               ;
!       fout << "<extension id=\"org.eclipse.cdt.core.GNU_ELF\""
!               " point=\"org.eclipse.cdt.core.BinaryParser\">\n"
!               "<attribute key=\"addr2line\" value=\"addr2line\"/>\n"
!               "<attribute key=\"c++filt\" value=\"c++filt\"/>\n"
!               "</extension>\n"
!               ;
!       break;
!     case EclipseToolchainCygwin  :
        fout << "<extension id=\"org.eclipse.cdt.core.Cygwin_PE\""
                " point=\"org.eclipse.cdt.core.BinaryParser\">\n"
--- 486,508 ----
      ;
    // TODO: refactor this out...
!   std::string executableFormat = mf->GetSafeDefinition(
!                                                     "CMAKE_EXECUTABLE_FORMAT");
!   if (executableFormat == "ELF")
!     {
!     fout << "<extension id=\"org.eclipse.cdt.core.ELF\""
!             " point=\"org.eclipse.cdt.core.BinaryParser\"/>\n"
!             ;
!     fout << "<extension id=\"org.eclipse.cdt.core.GNU_ELF\""
!             " point=\"org.eclipse.cdt.core.BinaryParser\">\n"
!             "<attribute key=\"addr2line\" value=\"addr2line\"/>\n"
!             "<attribute key=\"c++filt\" value=\"c++filt\"/>\n"
!             "</extension>\n"
!             ;
!     }
!   else
!     {
!     std::string systemName = mf->GetSafeDefinition("CMAKE_SYSTEM_NAME");
!     if (systemName == "CYGWIN")
!       {
        fout << "<extension id=\"org.eclipse.cdt.core.Cygwin_PE\""
                " point=\"org.eclipse.cdt.core.BinaryParser\">\n"
***************
*** 441,456 ****
                "</extension>\n"
                ;
!       break;
!     case EclipseToolchainMinGW   :
        fout << "<extension id=\"org.eclipse.cdt.core.PE\""
                " point=\"org.eclipse.cdt.core.BinaryParser\"/>\n"
                ;
!       break;
!     case EclipseToolchainSolaris :
!       fout << "<extension id=\"org.eclipse.cdt.core.ELF\""
!               " point=\"org.eclipse.cdt.core.BinaryParser\"/>\n"
!               ;
!       break;
!     case EclipseToolchainMacOSX  :
        fout << "<extension id=\"org.eclipse.cdt.core.MachO\""
                " point=\"org.eclipse.cdt.core.BinaryParser\">\n"
--- 513,525 ----
                "</extension>\n"
                ;
!       }
!     else if (systemName == "Windows")
!       {
        fout << "<extension id=\"org.eclipse.cdt.core.PE\""
                " point=\"org.eclipse.cdt.core.BinaryParser\"/>\n"
                ;
!       }
!     else if (systemName == "Darwin")
!       {
        fout << "<extension id=\"org.eclipse.cdt.core.MachO\""
                " point=\"org.eclipse.cdt.core.BinaryParser\">\n"
***************
*** 458,474 ****
                "</extension>\n"
                ;
!       break;
!     case EclipseToolchainOther   :
!       fout << "<extension id=\"org.eclipse.cdt.core.PE\""
!               " point=\"org.eclipse.cdt.core.BinaryParser\"/>\n"
!               ;
!       fout << "<extension id=\"org.eclipse.cdt.core.ELF\""
!               " point=\"org.eclipse.cdt.core.BinaryParser\"/>\n"
!               ;
!       break;
!     default      :
        // *** Should never get here ***
        fout << "<error_toolchain_type/>\n";
!   }
    fout << "</extensions>\n"
            "</storageModule>\n"
--- 527,538 ----
                "</extension>\n"
                ;
!       }
!     else
!       {
        // *** Should never get here ***
        fout << "<error_toolchain_type/>\n";
!       }
!     }
! 
    fout << "</extensions>\n"
            "</storageModule>\n"
***************
*** 829,866 ****
  
  //----------------------------------------------------------------------------
- cmExtraEclipseCDT4Generator::EclipseToolchainType
- cmExtraEclipseCDT4Generator::GetToolChainType(const cmMakefile& makefile)
- {
-   if (makefile.IsSet("UNIX"))
-     {
-     if (makefile.IsSet("CYGWIN"))
-       {
-       return EclipseToolchainCygwin;
-       }
-     if (makefile.IsSet("APPLE" ))
-       {
-       return EclipseToolchainMacOSX;
-       }
-     // *** how do I determine if it is Solaris ???
-     return EclipseToolchainLinux;
-     }
-   else if (makefile.IsSet("WIN32"))
-     {
-     if (makefile.IsSet("MINGW"))
-       {
-       return EclipseToolchainMinGW;
-       }
-     if (makefile.IsSet("MSYS" ))
-       {
-       return EclipseToolchainMinGW;
-       }
-     return EclipseToolchainOther;
-     }
-   else
-     {
-     return EclipseToolchainOther;
-     }
- }
- 
  std::string
  cmExtraEclipseCDT4Generator::GetEclipsePath(const std::string& path)
--- 893,896 ----

Index: cmTarget.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.cxx,v
retrieving revision 1.271.2.3
retrieving revision 1.271.2.4
diff -C 2 -d -r1.271.2.3 -r1.271.2.4
*** cmTarget.cxx	3 Nov 2009 22:25:02 -0000	1.271.2.3
--- cmTarget.cxx	28 Jan 2010 21:47:59 -0000	1.271.2.4
***************
*** 574,577 ****
--- 574,594 ----
  
    cm->DefineProperty
+     ("OSX_ARCHITECTURES", cmProperty::TARGET,
+      "Target specific architectures for OS X.",
+      "The OSX_ARCHITECTURES property sets the target binary architecture "
+      "for targets on OS X.  "
+      "This property is initialized by the value of the variable "
+      "CMAKE_OSX_ARCHITECTURES if it is set when a target is created.  "
+      "Use OSX_ARCHITECTURES_<CONFIG> to set the binary architectures on a "
+      "per-configuration basis.  "
+      "<CONFIG> is an upper-case name (ex: \"OSX_ARCHITECTURES_DEBUG\").");
+ 
+   cm->DefineProperty
+     ("OSX_ARCHITECTURES_<CONFIG>", cmProperty::TARGET,
+      "Per-configuration OS X binary architectures for a target.",
+      "This property is the configuration-specific version of "
+      "OSX_ARCHITECTURES.");
+ 
+   cm->DefineProperty
      ("OUTPUT_NAME", cmProperty::TARGET,
       "Output name for target files.",
***************
*** 885,892 ****
--- 902,919 ----
       "This property specifies the directory into which " #type " target "   \
       "files should be built. "                                              \
+      "Multi-configuration generators (VS, Xcode) append "                   \
+      "a per-configuration subdirectory to the specified directory.  "       \
       CM_TARGET_FILE_TYPES_DOC "  "                                          \
       "This property is initialized by the value of the variable "           \
       "CMAKE_" #TYPE "_OUTPUT_DIRECTORY if it is set when a target is created."
  
+ #define CM_TARGET_OUTDIR_CONFIG_DOC(TYPE)                                   \
+      "This is a per-configuration version of " #TYPE "_OUTPUT_DIRECTORY, "  \
+      "but multi-configuration generators (VS, Xcode) do NOT append "        \
+      "a per-configuration subdirectory to the specified directory.  "       \
+      "This property is initialized by the value of the variable "           \
+      "CMAKE_" #TYPE "_OUTPUT_DIRECTORY_<CONFIG> "                           \
+      "if it is set when a target is created."
+ 
    cm->DefineProperty
      ("ARCHIVE_OUTPUT_DIRECTORY", cmProperty::TARGET,
***************
*** 894,904 ****
--- 921,943 ----
       CM_TARGET_OUTDIR_DOC(ARCHIVE, archive));
    cm->DefineProperty
+     ("ARCHIVE_OUTPUT_DIRECTORY_<CONFIG>", cmProperty::TARGET,
+      "Per-configuration output directory for ARCHIVE target files.",
+      CM_TARGET_OUTDIR_CONFIG_DOC(ARCHIVE));
+   cm->DefineProperty
      ("LIBRARY_OUTPUT_DIRECTORY", cmProperty::TARGET,
       "Output directory in which to build LIBRARY target files.",
       CM_TARGET_OUTDIR_DOC(LIBRARY, library));
    cm->DefineProperty
+     ("LIBRARY_OUTPUT_DIRECTORY_<CONFIG>", cmProperty::TARGET,
+      "Per-configuration output directory for LIBRARY target files.",
+      CM_TARGET_OUTDIR_CONFIG_DOC(LIBRARY));
+   cm->DefineProperty
      ("RUNTIME_OUTPUT_DIRECTORY", cmProperty::TARGET,
       "Output directory in which to build RUNTIME target files.",
       CM_TARGET_OUTDIR_DOC(RUNTIME, runtime));
+   cm->DefineProperty
+     ("RUNTIME_OUTPUT_DIRECTORY_<CONFIG>", cmProperty::TARGET,
+      "Per-configuration output directory for RUNTIME target files.",
+      CM_TARGET_OUTDIR_CONFIG_DOC(RUNTIME));
  
    cm->DefineProperty
***************
*** 984,987 ****
--- 1023,1027 ----
    this->SetPropertyDefault("RUNTIME_OUTPUT_DIRECTORY", 0);
    this->SetPropertyDefault("Fortran_MODULE_DIRECTORY", 0);
+   this->SetPropertyDefault("OSX_ARCHITECTURES", 0);
  
    // Collect the set of configuration types.
***************
*** 1001,1007 ****
--- 1041,1060 ----
  
    // Setup per-configuration property default values.
+   const char* configProps[] = {
+     "ARCHIVE_OUTPUT_DIRECTORY_",
+     "LIBRARY_OUTPUT_DIRECTORY_",
+     "RUNTIME_OUTPUT_DIRECTORY_",
+     0};
    for(std::vector<std::string>::iterator ci = configNames.begin();
        ci != configNames.end(); ++ci)
      {
+     std::string configUpper = cmSystemTools::UpperCase(*ci);
+     for(const char** p = configProps; *p; ++p)
+       {
+       std::string property = *p;
+       property += configUpper;
+       this->SetPropertyDefault(property.c_str(), 0);
+       }
+ 
      // Initialize per-configuration name postfix property from the
      // variable only for non-executable targets.  This preserves
***************
*** 3037,3041 ****
  
    // Name shared libraries with their version number on some platforms.
!   if(const char* version = this->GetProperty("VERSION"))
      {
      if(this->GetType() == cmTarget::SHARED_LIBRARY && !implib &&
--- 3090,3094 ----
  
    // Name shared libraries with their version number on some platforms.
!   if(const char* soversion = this->GetProperty("SOVERSION"))
      {
      if(this->GetType() == cmTarget::SHARED_LIBRARY && !implib &&
***************
*** 3043,3047 ****
        {
        outBase += "-";
!       outBase += version;
        }
      }
--- 3096,3100 ----
        {
        outBase += "-";
!       outBase += soversion;
        }
      }
***************
*** 3424,3435 ****
                                                        bool for_xcode)
  {
!   // Lookup the target property.
!   const char* install_name_dir = this->GetProperty("INSTALL_NAME_DIR");
!   if(this->Makefile->IsOn("CMAKE_PLATFORM_HAS_INSTALLNAME") &&
!      !this->Makefile->IsOn("CMAKE_SKIP_RPATH") &&
!      install_name_dir && *install_name_dir)
      {
!     std::string dir = install_name_dir;
!     dir += "/";
      if(this->IsFrameworkOnApple() && !for_xcode)
        {
--- 3477,3494 ----
                                                        bool for_xcode)
  {
!   if(this->Makefile->IsOn("CMAKE_PLATFORM_HAS_INSTALLNAME"))
      {
!     std::string dir;
! 
!     if(!this->Makefile->IsOn("CMAKE_SKIP_RPATH"))
!       {
!       const char* install_name_dir = this->GetProperty("INSTALL_NAME_DIR");
!       if(install_name_dir && *install_name_dir)
!         {
!         dir = install_name_dir;
!         dir += "/";
!         }
!       }
! 
      if(this->IsFrameworkOnApple() && !for_xcode)
        {
***************
*** 3439,3442 ****
--- 3498,3502 ----
        dir += "/";
        }
+ 
      return dir;
      }
***************
*** 3509,3514 ****
    // Look for a target property defining the target output directory
    // based on the target type.
    const char* propertyName = 0;
!   std::string propertyNameStr = this->GetOutputTargetType(implib);
    if(!propertyNameStr.empty())
      {
--- 3569,3575 ----
    // Look for a target property defining the target output directory
    // based on the target type.
+   std::string targetTypeName = this->GetOutputTargetType(implib);
    const char* propertyName = 0;
!   std::string propertyNameStr = targetTypeName;
    if(!propertyNameStr.empty())
      {
***************
*** 3517,3522 ****
      }
  
    // Select an output directory.
!   if(const char* outdir = this->GetProperty(propertyName))
      {
      // Use the user-specified output directory.
--- 3578,3602 ----
      }
  
+   // Check for a per-configuration output directory target property.
+   std::string configUpper = cmSystemTools::UpperCase(config? config : "");
+   const char* configProp = 0;
+   std::string configPropStr = targetTypeName;
+   if(!configPropStr.empty())
+     {
+     configPropStr += "_OUTPUT_DIRECTORY_";
+     configPropStr += configUpper;
+     configProp = configPropStr.c_str();
+     }
+ 
    // Select an output directory.
!   if(const char* config_outdir = this->GetProperty(configProp))
!     {
!     // Use the user-specified per-configuration output directory.
!     out = config_outdir;
! 
!     // Skip per-configuration subdirectory.
!     config = 0;
!     }
!   else if(const char* outdir = this->GetProperty(propertyName))
      {
      // Use the user-specified output directory.
***************
*** 3649,3652 ****
--- 3729,3753 ----
  
  //----------------------------------------------------------------------------
+ void cmTarget::GetAppleArchs(const char* config,
+                              std::vector<std::string>& archVec)
+ {
+   const char* archs = 0;
+   if(config && *config)
+     {
+     std::string defVarName = "OSX_ARCHITECTURES_";
+     defVarName += cmSystemTools::UpperCase(config);
+     archs = this->GetProperty(defVarName.c_str());
+     }
+   if(!archs)
+     {
+     archs = this->GetProperty("OSX_ARCHITECTURES");
+     }
+   if(archs)
+     {
+     cmSystemTools::ExpandListArgument(std::string(archs), archVec);
+     }
+ }
+ 
+ //----------------------------------------------------------------------------
  bool cmTarget::IsChrpathUsed(const char* config)
  {

Index: cmGlobalVisualStudio10Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudio10Generator.cxx,v
retrieving revision 1.2.2.2
retrieving revision 1.2.2.3
diff -C 2 -d -r1.2.2.2 -r1.2.2.3
*** cmGlobalVisualStudio10Generator.cxx	28 Oct 2009 16:15:13 -0000	1.2.2.2
--- cmGlobalVisualStudio10Generator.cxx	28 Jan 2010 21:47:50 -0000	1.2.2.3
***************
*** 26,29 ****
--- 26,31 ----
  {
    mf->AddDefinition("MSVC10", "1");
+   mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "X86");
+   mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "X86");
  }
  

Index: cmGlobalXCodeGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalXCodeGenerator.h,v
retrieving revision 1.64.2.1
retrieving revision 1.64.2.2
diff -C 2 -d -r1.64.2.1 -r1.64.2.2
*** cmGlobalXCodeGenerator.h	1 Oct 2009 21:21:04 -0000	1.64.2.1
--- cmGlobalXCodeGenerator.h	28 Jan 2010 21:47:56 -0000	1.64.2.2
***************
*** 81,84 ****
--- 81,89 ----
                                        dirs);
    void SetCurrentLocalGenerator(cmLocalGenerator*);
+ 
+   /** Return true if the generated build tree may contain multiple builds.
+       i.e. "Can I build Debug and Release in the same tree?" */
+   virtual bool IsMultiConfig();
+ 
  private: 
    cmXCodeObject* CreateOrGetPBXGroup(cmTarget& cmtarget,

Index: cmGlobalVisualStudio9Win64Generator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudio9Win64Generator.h,v
retrieving revision 1.1.6.1
retrieving revision 1.1.6.2
diff -C 2 -d -r1.1.6.1 -r1.1.6.2
*** cmGlobalVisualStudio9Win64Generator.h	1 Oct 2009 21:21:04 -0000	1.1.6.1
--- cmGlobalVisualStudio9Win64Generator.h	28 Jan 2010 21:47:56 -0000	1.1.6.2
***************
*** 44,49 ****
     * extension, pthreads, byte order etc.  
     */
!   virtual void EnableLanguage(std::vector<std::string>const& languages, 
!                               cmMakefile *, bool optional);
  };
  #endif
--- 44,48 ----
     * extension, pthreads, byte order etc.  
     */
!   virtual void AddPlatformDefinitions(cmMakefile *);
  };
  #endif

Index: cmGlobalVisualStudio8Win64Generator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudio8Win64Generator.h,v
retrieving revision 1.3.4.1
retrieving revision 1.3.4.2
diff -C 2 -d -r1.3.4.1 -r1.3.4.2
*** cmGlobalVisualStudio8Win64Generator.h	1 Oct 2009 21:21:03 -0000	1.3.4.1
--- cmGlobalVisualStudio8Win64Generator.h	28 Jan 2010 21:47:56 -0000	1.3.4.2
***************
*** 44,49 ****
     * extension, pthreads, byte order etc.  
     */
!   virtual void EnableLanguage(std::vector<std::string>const& languages, 
!                               cmMakefile *, bool optional);
  };
  #endif
--- 44,48 ----
     * extension, pthreads, byte order etc.  
     */
!   virtual void AddPlatformDefinitions(cmMakefile *);
  };
  #endif

Index: cmGlobalXCodeGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalXCodeGenerator.cxx,v
retrieving revision 1.232.2.5
retrieving revision 1.232.2.6
diff -C 2 -d -r1.232.2.5 -r1.232.2.6
*** cmGlobalXCodeGenerator.cxx	11 Nov 2009 18:34:15 -0000	1.232.2.5
--- cmGlobalXCodeGenerator.cxx	28 Jan 2010 21:47:56 -0000	1.232.2.6
***************
*** 1533,1536 ****
--- 1533,1564 ----
      }
  
+   // Set target-specific architectures.
+   std::vector<std::string> archs;
+   target.GetAppleArchs(configName, archs);
+   if(!archs.empty())
+     {
+     // Enable ARCHS attribute.
+     buildSettings->AddAttribute("ONLY_ACTIVE_ARCH",
+                                 this->CreateString("NO"));
+ 
+     // Store ARCHS value.
+     if(archs.size() == 1)
+       {
+       buildSettings->AddAttribute("ARCHS",
+                                   this->CreateString(archs[0].c_str()));
+       }
+     else
+       {
+       cmXCodeObject* archObjects =
+         this->CreateObject(cmXCodeObject::OBJECT_LIST);
+       for(std::vector<std::string>::iterator i = archs.begin();
+           i != archs.end(); i++)
+         {
+         archObjects->AddObject(this->CreateString((*i).c_str()));
+         }
+       buildSettings->AddAttribute("ARCHS", archObjects);
+       }
+     }
+ 
    // Get the product name components.
    std::string pnprefix;
***************
*** 1550,1554 ****
       target.GetType() == cmTarget::EXECUTABLE)
      {
!     pndir = target.GetDirectory();
      buildSettings->AddAttribute("EXECUTABLE_PREFIX", 
                                  this->CreateString(pnprefix.c_str()));
--- 1578,1593 ----
       target.GetType() == cmTarget::EXECUTABLE)
      {
!     if(this->XcodeVersion >= 21)
!       {
!       std::string pncdir = target.GetDirectory(configName);
!       buildSettings->AddAttribute("CONFIGURATION_BUILD_DIR",
!                                   this->CreateString(pncdir.c_str()));
!       }
!     else
!       {
!       buildSettings->AddAttribute("OBJROOT",
!                                   this->CreateString(pndir.c_str()));
!       pndir = target.GetDirectory(configName);
!       }
      buildSettings->AddAttribute("EXECUTABLE_PREFIX", 
                                  this->CreateString(pnprefix.c_str()));
***************
*** 2896,2900 ****
          if(this->Architectures.size() > 1)
            {
!           std::string universal = t->GetDirectory();
            universal += "/";
            universal += this->CurrentProject;
--- 2935,2940 ----
          if(this->Architectures.size() > 1)
            {
!           std::string universal =
!             t->GetMakefile()->GetCurrentOutputDirectory();
            universal += "/";
            universal += this->CurrentProject;
***************
*** 3263,3264 ****
--- 3303,3319 ----
    return plist;
  }
+ 
+ //----------------------------------------------------------------------------
+ // Return true if the generated build tree may contain multiple builds.
+ // i.e. "Can I build Debug and Release in the same tree?"
+ bool cmGlobalXCodeGenerator::IsMultiConfig()
+ {
+   // Old Xcode 1.5 is single config:
+   if(this->XcodeVersion == 15)
+     {
+     return false;
+     }
+ 
+   // Newer Xcode versions are multi config:
+   return true;
+ }

Index: cmIfCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmIfCommand.h,v
retrieving revision 1.57.2.2
retrieving revision 1.57.2.3
diff -C 2 -d -r1.57.2.2 -r1.57.2.3
*** cmIfCommand.h	28 Oct 2009 16:15:18 -0000	1.57.2.2
--- cmIfCommand.h	28 Jan 2010 21:47:56 -0000	1.57.2.3
***************
*** 159,162 ****
--- 159,165 ----
        "True if the given name is a directory.  "
        "Behavior is well-defined only for full paths.\n"
+       "  if(IS_SYMLINK file-name)\n"
+       "True if the given name is a symbolic link.  "
+       "Behavior is well-defined only for full paths.\n"
        "  if(IS_ABSOLUTE path)\n"
        "True if the given path is an absolute path.\n"

Index: cmXMLSafe.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmXMLSafe.cxx,v
retrieving revision 1.5.2.1
retrieving revision 1.5.2.2
diff -C 2 -d -r1.5.2.1 -r1.5.2.2
*** cmXMLSafe.cxx	1 Oct 2009 21:21:10 -0000	1.5.2.1
--- cmXMLSafe.cxx	28 Jan 2010 21:48:00 -0000	1.5.2.2
***************
*** 12,15 ****
--- 12,17 ----
  #include "cmXMLSafe.h"
  
+ #include "cm_utf8.h"
+ 
  #include <cmsys/ios/iostream>
  #include <cmsys/ios/sstream>
***************
*** 54,95 ****
    char const* first = self.Data;
    char const* last = self.Data + self.Size;
!   for(char const* ci = first; ci != last; ++ci)
      {
!     unsigned char c = static_cast<unsigned char>(*ci);
!     switch(c)
        {
!       case '&': os << "&amp;"; break;
!       case '<': os << "&lt;"; break;
!       case '>': os << "&gt;"; break;
!       case '"': os << (self.DoQuotes? "&quot;" : "\""); break;
!       case '\'': os << (self.DoQuotes? "&apos;" : "'"); break;
!       case '\t': os << "\t"; break;
!       case '\n': os << "\n"; break;
!       case '\r': break; // Ignore CR
!       default:
!         if(c >= 0x20 && c <= 0x7f)
!           {
!           os.put(static_cast<char>(c));
!           }
!         else
            {
!           // TODO: More complete treatment of program output character
!           // encoding.  Instead of escaping these bytes, we should
!           // handle the current locale and its encoding.
!           char buf[16];
!           // http://www.w3.org/TR/REC-xml/#NT-Char
!           if(c >= 0x80)
!             {
!             sprintf(buf, "&#x%hx;", static_cast<unsigned short>(c));
!             }
!           else
!             {
!             // We cannot use "&#x%hx;" here because this value is not
!             // valid in XML.  Instead use a human-readable hex value.
!             sprintf(buf, "&lt;0x%hx&gt;", static_cast<unsigned short>(c));
!             }
!           os << buf;
            }
!         break;
        }
      }
--- 56,100 ----
    char const* first = self.Data;
    char const* last = self.Data + self.Size;
!   while(first != last)
      {
!     unsigned int ch;
!     if(const char* next = cm_utf8_decode_character(first, last, &ch))
        {
!       // http://www.w3.org/TR/REC-xml/#NT-Char
!       if((ch >= 0x20 && ch <= 0xD7FF) ||
!          (ch >= 0xE000 && ch <= 0xFFFD) ||
!          (ch >= 0x10000 && ch <= 0x10FFFF) ||
!           ch == 0x9 || ch == 0xA || ch == 0xD)
!         {
!         switch(ch)
            {
!           // Escape XML control characters.
!           case '&': os << "&amp;"; break;
!           case '<': os << "&lt;"; break;
!           case '>': os << "&gt;"; break;
!           case '"': os << (self.DoQuotes? "&quot;" : "\""); break;
!           case '\'': os << (self.DoQuotes? "&apos;" : "'"); break;
!           case '\r': break; // Ignore CR
!           // Print the UTF-8 character.
!           default: os.write(first, next-first); break;
            }
!         }
!       else
!         {
!         // Use a human-readable hex value for this invalid character.
!         char buf[16];
!         sprintf(buf, "%X", ch);
!         os << "[NON-XML-CHAR-0x" << buf << "]";
!         }
! 
!       first = next;
!       }
!     else
!       {
!       ch = static_cast<unsigned char>(*first++);
!       // Use a human-readable hex value for this invalid byte.
!       char buf[16];
!       sprintf(buf, "%X", ch);
!       os << "[NON-UTF-8-BYTE-0x" << buf << "]";
        }
      }

Index: cmake.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.cxx,v
retrieving revision 1.429.2.4
retrieving revision 1.429.2.5
diff -C 2 -d -r1.429.2.4 -r1.429.2.5
*** cmake.cxx	10 Nov 2009 14:03:39 -0000	1.429.2.4
--- cmake.cxx	28 Jan 2010 21:48:00 -0000	1.429.2.5
***************
*** 68,71 ****
--- 68,72 ----
  #    include "cmGlobalBorlandMakefileGenerator.h"
  #    include "cmGlobalNMakeMakefileGenerator.h"
+ #    include "cmGlobalJOMMakefileGenerator.h"
  #    include "cmGlobalWatcomWMakeGenerator.h"
  #    define CMAKE_HAVE_VS_GENERATORS
***************
*** 82,86 ****
  #endif
  
! #if !defined(__CYGWIN__) && !defined(CMAKE_BOOT_MINGW)
  # include "cmExtraCodeBlocksGenerator.h"
  #endif
--- 83,87 ----
  #endif
  
! #if !defined(CMAKE_BOOT_MINGW)
  # include "cmExtraCodeBlocksGenerator.h"
  #endif
***************
*** 1379,1437 ****
      else if (args[1] == "cmake_symlink_library" && args.size() == 5)
        {
!       int result = 0;
!       std::string realName = args[2];
!       std::string soName = args[3];
!       std::string name = args[4];
!       if(soName != realName)
!         {
!         std::string fname = cmSystemTools::GetFilenameName(realName);
!         if(cmSystemTools::FileExists(soName.c_str()) ||
!            cmSystemTools::FileIsSymlink(soName.c_str()))
!           {
!           cmSystemTools::RemoveFile(soName.c_str());
!           }
!         if(!cmSystemTools::CreateSymlink(fname.c_str(), soName.c_str()))
!           {
!           cmSystemTools::ReportLastSystemError("cmake_symlink_library");
!           result = 1;
!           }
!         }
!       if(name != soName)
!         {
!         std::string fname = cmSystemTools::GetFilenameName(soName);
!         if(cmSystemTools::FileExists(name.c_str()) ||
!            cmSystemTools::FileIsSymlink(name.c_str()))
!           {
!           cmSystemTools::RemoveFile(name.c_str());
!           }
!         if(!cmSystemTools::CreateSymlink(fname.c_str(), name.c_str()))
!           {
!           cmSystemTools::ReportLastSystemError("cmake_symlink_library");
!           result = 1;
!           }
!         }
!       return result;
        }
      // Internal CMake versioned executable support.
      else if (args[1] == "cmake_symlink_executable" && args.size() == 4)
        {
!       int result = 0;
!       std::string realName = args[2];
!       std::string name = args[3];
!       if(name != realName)
!         {
!         std::string fname = cmSystemTools::GetFilenameName(realName);
!         if(cmSystemTools::FileExists(name.c_str()) ||
!            cmSystemTools::FileIsSymlink(name.c_str()))
!           {
!           cmSystemTools::RemoveFile(name.c_str());
!           }
!         if(!cmSystemTools::CreateSymlink(fname.c_str(), name.c_str()))
!           {
!           cmSystemTools::ReportLastSystemError("cmake_symlink_executable");
!           result = 1;
!           }
!         }
!       return result;
        }
  
--- 1380,1389 ----
      else if (args[1] == "cmake_symlink_library" && args.size() == 5)
        {
!       return cmake::SymlinkLibrary(args);
        }
      // Internal CMake versioned executable support.
      else if (args[1] == "cmake_symlink_executable" && args.size() == 4)
        {
!       return cmake::SymlinkExecutable(args);
        }
  
***************
*** 1466,1471 ****
        {
        // Use the make system's VERBOSE environment variable to enable
!       // verbose output.
!       bool verbose = cmSystemTools::GetEnv("VERBOSE") != 0;
  
        // Create a cmake object instance to process dependencies.
--- 1418,1425 ----
        {
        // Use the make system's VERBOSE environment variable to enable
!       // verbose output. This can be skipped by also setting CMAKE_NO_VERBOSE
!       // (which is set by the Eclipse and KDevelop generators).
!       bool verbose = ((cmSystemTools::GetEnv("VERBOSE") != 0) 
!                        && (cmSystemTools::GetEnv("CMAKE_NO_VERBOSE") == 0));
  
        // Create a cmake object instance to process dependencies.
***************
*** 1694,1701 ****
  #endif
  
- #if !defined(__CYGWIN__)
    this->AddExtraGenerator(cmExtraCodeBlocksGenerator::GetActualName(),
                            &cmExtraCodeBlocksGenerator::New);
- #endif
  
  #ifdef CMAKE_USE_ECLIPSE
--- 1648,1653 ----
***************
*** 2365,2396 ****
  }
  
- int cmake::DumpDocumentationToFile(std::ostream& f)
- {
- #ifdef CMAKE_BUILD_WITH_CMAKE
-   // Loop over all registered commands and print out documentation
-   const char *name;
-   const char *terse;
-   const char *full;
-   char tmp[1024];
-   sprintf(tmp,"Version %s", cmVersion::GetCMakeVersion());
-   f << "<html>\n";
-   f << "<h1>Documentation for commands of CMake " << tmp << "</h1>\n";
-   f << "<ul>\n";
-   for(RegisteredCommandsMap::iterator j = this->Commands.begin();
-       j != this->Commands.end(); ++j)
-     {
-     name = (*j).second->GetName();
-     terse = (*j).second->GetTerseDocumentation();
-     full = (*j).second->GetFullDocumentation();
-     f << "<li><b>" << name << "</b> - " << terse << std::endl
-       << "<br><i>Usage:</i> " << full << "</li>" << std::endl << std::endl;
-     }
-   f << "</ul></html>\n";
- #else
-   (void)f;
- #endif
-   return 1;
- }
- 
  void cmake::AddDefaultCommands()
  {
--- 2317,2320 ----
***************
*** 2431,2434 ****
--- 2355,2360 ----
    this->Generators[cmGlobalNMakeMakefileGenerator::GetActualName()] =
      &cmGlobalNMakeMakefileGenerator::New;
+   this->Generators[cmGlobalJOMMakefileGenerator::GetActualName()] =
+     &cmGlobalJOMMakefileGenerator::New;
    this->Generators[cmGlobalWatcomWMakeGenerator::GetActualName()] =
      &cmGlobalWatcomWMakeGenerator::New;
***************
*** 2589,2595 ****
    // We do not need to rerun CMake.  Check dependency integrity.  Use
    // the make system's VERBOSE environment variable to enable verbose
!   // output.
!   bool verbose = cmSystemTools::GetEnv("VERBOSE") != 0;
!   
    // This method will check the integrity of the build system if the
    // option was given on the command line.  It reads the given file to
--- 2515,2523 ----
    // We do not need to rerun CMake.  Check dependency integrity.  Use
    // the make system's VERBOSE environment variable to enable verbose
!   // output. This can be skipped by setting CMAKE_NO_VERBOSE (which is set
!   // by the Eclipse and KDevelop generators).
!   bool verbose = ((cmSystemTools::GetEnv("VERBOSE") != 0) 
!                    && (cmSystemTools::GetEnv("CMAKE_NO_VERBOSE") == 0));
! 
    // This method will check the integrity of the build system if the
    // option was given on the command line.  It reads the given file to
***************
*** 3132,3135 ****
--- 3060,3122 ----
  
  //----------------------------------------------------------------------------
+ int cmake::SymlinkLibrary(std::vector<std::string>& args)
+ {
+   int result = 0;
+   std::string realName = args[2];
+   std::string soName = args[3];
+   std::string name = args[4];
+   if(soName != realName)
+     {
+     if(!cmake::SymlinkInternal(realName, soName))
+       {
+       cmSystemTools::ReportLastSystemError("cmake_symlink_library");
+       result = 1;
+       }
+     }
+   if(name != soName)
+     {
+     if(!cmake::SymlinkInternal(soName, name))
+       {
+       cmSystemTools::ReportLastSystemError("cmake_symlink_library");
+       result = 1;
+       }
+     }
+   return result;
+ }
+ 
+ //----------------------------------------------------------------------------
+ int cmake::SymlinkExecutable(std::vector<std::string>& args)
+ {
+   int result = 0;
+   std::string realName = args[2];
+   std::string name = args[3];
+   if(name != realName)
+     {
+     if(!cmake::SymlinkInternal(realName, name))
+       {
+       cmSystemTools::ReportLastSystemError("cmake_symlink_executable");
+       result = 1;
+       }
+     }
+   return result;
+ }
+ 
+ //----------------------------------------------------------------------------
+ bool cmake::SymlinkInternal(std::string const& file, std::string const& link)
+ {
+   if(cmSystemTools::FileExists(link.c_str()) ||
+      cmSystemTools::FileIsSymlink(link.c_str()))
+     {
+     cmSystemTools::RemoveFile(link.c_str());
+     }
+ #if defined(_WIN32) && !defined(__CYGWIN__)
+   return cmSystemTools::CopyFileAlways(file.c_str(), link.c_str());
+ #else
+   std::string linktext = cmSystemTools::GetFilenameName(file);
+   return cmSystemTools::CreateSymlink(linktext.c_str(), link.c_str());
+ #endif
+ }
+ 
+ //----------------------------------------------------------------------------
  #ifdef CMAKE_BUILD_WITH_CMAKE
  int cmake::ExecuteEchoColor(std::vector<std::string>& args)
***************
*** 4403,4407 ****
                   const std::vector<std::string>& nativeOptions,
                   bool clean)
! { 
    if(!cmSystemTools::FileIsDirectory(dir.c_str()))
      {
--- 4390,4394 ----
                   const std::vector<std::string>& nativeOptions,
                   bool clean)
! {
    if(!cmSystemTools::FileIsDirectory(dir.c_str()))
      {
***************
*** 4423,4428 ****
      return 1;
      }
!   cmGlobalGenerator* gen =
!     this->CreateGlobalGenerator(it.GetValue());
    std::string output;
    std::string projName;
--- 4410,4415 ----
      return 1;
      }
!   std::auto_ptr<cmGlobalGenerator> gen(
!     this->CreateGlobalGenerator(it.GetValue()));
    std::string output;
    std::string projName;

Index: cmLocalVisualStudio6Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio6Generator.cxx,v
retrieving revision 1.159.2.1
retrieving revision 1.159.2.2
diff -C 2 -d -r1.159.2.1 -r1.159.2.2
*** cmLocalVisualStudio6Generator.cxx	1 Oct 2009 21:21:06 -0000	1.159.2.1
--- cmLocalVisualStudio6Generator.cxx	28 Jan 2010 21:47:57 -0000	1.159.2.2
***************
*** 826,829 ****
--- 826,857 ----
  }
  
+ //----------------------------------------------------------------------------
+ cmsys::auto_ptr<cmCustomCommand>
+ cmLocalVisualStudio6Generator::MaybeCreateOutputDir(cmTarget& target,
+                                                     const char* config)
+ {
+   cmsys::auto_ptr<cmCustomCommand> pcc;
+ 
+   // VS6 forgets to create the output directory for archives if it
+   // differs from the intermediate directory.
+   if(target.GetType() != cmTarget::STATIC_LIBRARY) { return pcc; }
+   std::string outDir = target.GetDirectory(config, false);
+ 
+   // Add a pre-link event to create the directory.
+   cmCustomCommandLine command;
+   command.push_back(this->Makefile->GetRequiredDefinition("CMAKE_COMMAND"));
+   command.push_back("-E");
+   command.push_back("make_directory");
+   command.push_back(outDir);
+   std::vector<std::string> no_output;
+   std::vector<std::string> no_depends;
+   cmCustomCommandLines commands;
+   commands.push_back(command);
+   pcc.reset(new cmCustomCommand(no_output, no_depends, commands, 0, 0));
+   pcc->SetEscapeOldStyle(false);
+   pcc->SetEscapeAllowMakeVars(true);
+   return pcc;
+ }
+ 
  // look for custom rules on a target and collect them together
  std::string 
***************
*** 850,853 ****
--- 878,886 ----
      event.Write(*pcc);
      }
+   pcc = this->MaybeCreateOutputDir(target, configName);
+   if(pcc.get())
+     {
+     event.Write(*pcc);
+     }
    event.Finish();
  
***************
*** 1194,1197 ****
--- 1227,1254 ----
      }
  
+   // Compute the output directory for the target.
+   std::string outputDirDebug;
+   std::string outputDirRelease;
+   std::string outputDirMinSizeRel;
+   std::string outputDirRelWithDebInfo;
+   if(target.GetType() == cmTarget::EXECUTABLE ||
+      target.GetType() == cmTarget::STATIC_LIBRARY ||
+      target.GetType() == cmTarget::SHARED_LIBRARY ||
+      target.GetType() == cmTarget::MODULE_LIBRARY)
+     {
+     outputDirDebug =
+         removeQuotes(this->ConvertToOptionallyRelativeOutputPath(
+                        target.GetDirectory("Debug").c_str()));
+     outputDirRelease =
+         removeQuotes(this->ConvertToOptionallyRelativeOutputPath(
+                  target.GetDirectory("Release").c_str()));
+     outputDirMinSizeRel =
+         removeQuotes(this->ConvertToOptionallyRelativeOutputPath(
+                  target.GetDirectory("MinSizeRel").c_str()));
+     outputDirRelWithDebInfo =
+         removeQuotes(this->ConvertToOptionallyRelativeOutputPath(
+                  target.GetDirectory("RelWithDebInfo").c_str()));
+     }
+ 
    // Compute the proper link information for the target.
    std::string optionsDebug;
***************
*** 1413,1416 ****
--- 1470,1482 ----
      if(targetBuilds)
        {
+       cmSystemTools::ReplaceString(line, "OUTPUT_DIRECTORY_DEBUG",
+                                    outputDirDebug.c_str());
+       cmSystemTools::ReplaceString(line, "OUTPUT_DIRECTORY_RELEASE",
+                                    outputDirRelease.c_str());
+       cmSystemTools::ReplaceString(line, "OUTPUT_DIRECTORY_MINSIZEREL",
+                                    outputDirMinSizeRel.c_str());
+       cmSystemTools::ReplaceString(line, "OUTPUT_DIRECTORY_RELWITHDEBINFO",
+                                    outputDirRelWithDebInfo.c_str());
+ #ifdef CM_USE_OLD_VS6
        std::string outPath = target.GetDirectory();
        cmSystemTools::ReplaceString
***************
*** 1418,1421 ****
--- 1484,1488 ----
           removeQuotes(this->ConvertToOptionallyRelativeOutputPath
                        (outPath.c_str())).c_str());
+ #endif
        }
  

Index: cmGlobalVisualStudio8Win64Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudio8Win64Generator.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
*** cmGlobalVisualStudio8Win64Generator.cxx	1 Oct 2009 21:21:03 -0000	1.5.4.1
--- cmGlobalVisualStudio8Win64Generator.cxx	28 Jan 2010 21:47:56 -0000	1.5.4.2
***************
*** 43,51 ****
  }
  
  void cmGlobalVisualStudio8Win64Generator
! ::EnableLanguage(std::vector<std::string>const &  lang, 
!                  cmMakefile *mf, bool optional)
  {
    mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE");
!   cmGlobalVisualStudio8Generator::EnableLanguage(lang, mf, optional);
  }
--- 43,53 ----
  }
  
+ //----------------------------------------------------------------------------
  void cmGlobalVisualStudio8Win64Generator
! ::AddPlatformDefinitions(cmMakefile* mf)
  {
+   this->cmGlobalVisualStudio8Generator::AddPlatformDefinitions(mf);
    mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE");
!   mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "x64");
!   mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "x64");
  }

Index: cmLinkDirectoriesCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLinkDirectoriesCommand.cxx,v
retrieving revision 1.13.4.1
retrieving revision 1.13.4.2
diff -C 2 -d -r1.13.4.1 -r1.13.4.2
*** cmLinkDirectoriesCommand.cxx	1 Oct 2009 21:21:05 -0000	1.13.4.1
--- cmLinkDirectoriesCommand.cxx	28 Jan 2010 21:47:57 -0000	1.13.4.2
***************
*** 24,32 ****
        i != args.end(); ++i)
      {
!     std::string unixPath = *i;
!     cmSystemTools::ConvertToUnixSlashes(unixPath);
!     this->Makefile->AddLinkDirectory(unixPath.c_str());
      }
    return true;
  }
  
--- 24,70 ----
        i != args.end(); ++i)
      {
!     this->AddLinkDir(*i);
      }
    return true;
  }
  
+ //----------------------------------------------------------------------------
+ void cmLinkDirectoriesCommand::AddLinkDir(std::string const& dir)
+ {
+   std::string unixPath = dir;
+   cmSystemTools::ConvertToUnixSlashes(unixPath);
+   if(!cmSystemTools::FileIsFullPath(unixPath.c_str()))
+     {
+     bool convertToAbsolute = false;
+     cmOStringStream e;
+     e << "This command specifies the relative path\n"
+       << "  " << unixPath << "\n"
+       << "as a link directory.\n";
+     cmPolicies* policies = this->Makefile->GetPolicies();
+     switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0015))
+       {
+       case cmPolicies::WARN:
+         e << policies->GetPolicyWarning(cmPolicies::CMP0015);
+         this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, e.str());
+       case cmPolicies::OLD:
+         // OLD behavior does not convert
+         break;
+       case cmPolicies::REQUIRED_IF_USED:
+       case cmPolicies::REQUIRED_ALWAYS:
+         e << policies->GetRequiredPolicyError(cmPolicies::CMP0015);
+         this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
+       case cmPolicies::NEW:
+         // NEW behavior converts
+         convertToAbsolute = true;
+         break;
+       }
+     if (convertToAbsolute)
+       {
+       std::string tmp = this->Makefile->GetStartDirectory();
+       tmp += "/";
+       tmp += unixPath;
+       unixPath = tmp;
+       }
+     }
+   this->Makefile->AddLinkDirectory(unixPath.c_str());
+ }

Index: cmakemain.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmakemain.cxx,v
retrieving revision 1.89.2.1
retrieving revision 1.89.2.2
diff -C 2 -d -r1.89.2.1 -r1.89.2.2
*** cmakemain.cxx	1 Oct 2009 21:21:10 -0000	1.89.2.1
--- cmakemain.cxx	28 Jan 2010 21:48:00 -0000	1.89.2.2
***************
*** 424,428 ****
    for(int i =0; i < ac; ++i)
      {
!     if(strcmp(av[i], "-i") == 0)
        {
        wiz = true;
--- 424,428 ----
    for(int i =0; i < ac; ++i)
      {
!     if(!command && strcmp(av[i], "-i") == 0)
        {
        wiz = true;

Index: cmMakefileExecutableTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileExecutableTargetGenerator.cxx,v
retrieving revision 1.62.2.2
retrieving revision 1.62.2.3
diff -C 2 -d -r1.62.2.2 -r1.62.2.3
*** cmMakefileExecutableTargetGenerator.cxx	9 Oct 2009 20:11:15 -0000	1.62.2.2
--- cmMakefileExecutableTargetGenerator.cxx	28 Jan 2010 21:47:57 -0000	1.62.2.3
***************
*** 230,233 ****
--- 230,238 ----
    this->AddFeatureFlags(flags, linkLanguage);
  
+ #ifdef __APPLE__
+   this->LocalGenerator->AddArchitectureFlags(flags, this->Target,
+                                              linkLanguage, this->ConfigName);
+ #endif /* __APPLE__ */
+ 
    // Add target-specific linker flags.
    this->LocalGenerator->AppendFlags

Index: cmGlobalKdevelopGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalKdevelopGenerator.cxx,v
retrieving revision 1.33.2.1
retrieving revision 1.33.2.2
diff -C 2 -d -r1.33.2.1 -r1.33.2.2
*** cmGlobalKdevelopGenerator.cxx	1 Oct 2009 21:21:02 -0000	1.33.2.1
--- cmGlobalKdevelopGenerator.cxx	28 Jan 2010 21:47:50 -0000	1.33.2.2
***************
*** 476,479 ****
--- 476,480 ----
          "        <default>\n"
          "          <envvar value=\"1\" name=\"VERBOSE\" />\n"
+         "          <envvar value=\"1\" name=\"CMAKE_NO_VERBOSE\" />\n"
          "        </default>\n"
          "      </environments>\n"

Index: cmDocumentation.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDocumentation.cxx,v
retrieving revision 1.75.2.1
retrieving revision 1.75.2.2
diff -C 2 -d -r1.75.2.1 -r1.75.2.2
*** cmDocumentation.cxx	1 Oct 2009 21:20:57 -0000	1.75.2.1
--- cmDocumentation.cxx	28 Jan 2010 21:47:49 -0000	1.75.2.2
***************
*** 268,271 ****
--- 268,273 ----
    this->VariableSections.push_back("Variables that Control the Build");
    this->VariableSections.push_back("Variables for Languages");
+ 
+   this->ShowGenerators = true;
  }
  
***************
*** 1280,1284 ****
    this->AddSectionToPrint("Usage");
    this->AddSectionToPrint("Options");
!   this->AddSectionToPrint("Generators");
    this->Print(os);
    return true;
--- 1282,1289 ----
    this->AddSectionToPrint("Usage");
    this->AddSectionToPrint("Options");
!   if(this->ShowGenerators)
!     {
!     this->AddSectionToPrint("Generators");
!     }
    this->Print(os);
    return true;

Index: cmGlobalVisualStudio6Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudio6Generator.cxx,v
retrieving revision 1.78.2.2
retrieving revision 1.78.2.3
diff -C 2 -d -r1.78.2.2 -r1.78.2.3
*** cmGlobalVisualStudio6Generator.cxx	9 Oct 2009 20:11:12 -0000	1.78.2.2
--- cmGlobalVisualStudio6Generator.cxx	28 Jan 2010 21:47:50 -0000	1.78.2.3
***************
*** 45,48 ****
--- 45,50 ----
    mf->AddDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV", "1");
    mf->AddDefinition("CMAKE_GENERATOR_Fortran", "ifort");
+   mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "X86");
+   mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "X86");
    mf->AddDefinition("MSVC60", "1");
    this->GenerateConfigurations(mf);

--- cmDumpDocumentation.cxx DELETED ---

Index: cmBuildCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmBuildCommand.cxx,v
retrieving revision 1.24.4.1
retrieving revision 1.24.4.2
diff -C 2 -d -r1.24.4.1 -r1.24.4.2
*** cmBuildCommand.cxx	1 Oct 2009 21:20:36 -0000	1.24.4.1
--- cmBuildCommand.cxx	28 Jan 2010 21:47:49 -0000	1.24.4.2
***************
*** 15,31 ****
  #include "cmGlobalGenerator.h"
  
! // cmBuildCommand
  bool cmBuildCommand
  ::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
  {
    if(args.size() < 2 )
      {
!     this->SetError("called with incorrect number of arguments");
      return false;
      }
    const char* define = args[0].c_str();
    const char* cacheValue
      = this->Makefile->GetDefinition(define);
    std::string makeprogram = args[1];
    std::string configType = "Release";
    const char* cfg = getenv("CMAKE_CONFIG_TYPE");
--- 15,140 ----
  #include "cmGlobalGenerator.h"
  
! //----------------------------------------------------------------------
  bool cmBuildCommand
  ::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
  {
+   // Support the legacy signature of the command:
+   //
+   if(2 == args.size())
+     {
+     return this->TwoArgsSignature(args);
+     }
+ 
+   return this->MainSignature(args);
+ }
+ 
+ //----------------------------------------------------------------------
+ bool cmBuildCommand
+ ::MainSignature(std::vector<std::string> const& args)
+ {
+   if(args.size() < 1)
+     {
+     this->SetError("requires at least one argument naming a CMake variable");
+     return false;
+     }
+ 
+   // The cmake variable in which to store the result.
+   const char* variable = args[0].c_str();
+ 
+   // Parse remaining arguments.
+   const char* configuration = 0;
+   const char* project_name = 0;
+   const char* target = 0;
+   enum Doing { DoingNone, DoingConfiguration, DoingProjectName, DoingTarget };
+   Doing doing = DoingNone;
+   for(unsigned int i=1; i < args.size(); ++i)
+     {
+     if(args[i] == "CONFIGURATION")
+       {
+       doing = DoingConfiguration;
+       }
+     else if(args[i] == "PROJECT_NAME")
+       {
+       doing = DoingProjectName;
+       }
+     else if(args[i] == "TARGET")
+       {
+       doing = DoingTarget;
+       }
+     else if(doing == DoingConfiguration)
+       {
+       doing = DoingNone;
+       configuration = args[i].c_str();
+       }
+     else if(doing == DoingProjectName)
+       {
+       doing = DoingNone;
+       project_name = args[i].c_str();
+       }
+     else if(doing == DoingTarget)
+       {
+       doing = DoingNone;
+       target = args[i].c_str();
+       }
+     else
+       {
+       cmOStringStream e;
+       e << "unknown argument \"" << args[i] << "\"";
+       this->SetError(e.str().c_str());
+       return false;
+       }
+     }
+ 
+   const char* makeprogram
+     = this->Makefile->GetDefinition("CMAKE_MAKE_PROGRAM");
+ 
+   // If null/empty CONFIGURATION argument, GenerateBuildCommand uses 'Debug'
+   // in the currently implemented multi-configuration global generators...
+   // so we put this code here to end up with the same default configuration
+   // as the original 2-arg build_command signature:
+   //
+   if(!configuration || !*configuration)
+     {
+     configuration = getenv("CMAKE_CONFIG_TYPE");
+     }
+   if(!configuration || !*configuration)
+     {
+     configuration = "Release";
+     }
+ 
+   // If null/empty PROJECT_NAME argument, use the Makefile's project name:
+   //
+   if(!project_name || !*project_name)
+     {
+     project_name = this->Makefile->GetProjectName();
+     }
+ 
+   // If null/empty TARGET argument, GenerateBuildCommand omits any mention
+   // of a target name on the build command line...
+   //
+   std::string makecommand = this->Makefile->GetLocalGenerator()
+     ->GetGlobalGenerator()->GenerateBuildCommand
+     (makeprogram, project_name, 0, target, configuration, true, false);
+ 
+   this->Makefile->AddDefinition(variable, makecommand.c_str());
+ 
+   return true;
+ }
+ 
+ //----------------------------------------------------------------------
+ bool cmBuildCommand
+ ::TwoArgsSignature(std::vector<std::string> const& args)
+ {
    if(args.size() < 2 )
      {
!     this->SetError("called with less than two arguments");
      return false;
      }
+ 
    const char* define = args[0].c_str();
    const char* cacheValue
      = this->Makefile->GetDefinition(define);
    std::string makeprogram = args[1];
+ 
    std::string configType = "Release";
    const char* cfg = getenv("CMAKE_CONFIG_TYPE");
***************
*** 34,37 ****
--- 143,147 ----
      configType = cfg;
      }
+ 
    std::string makecommand = this->Makefile->GetLocalGenerator()
      ->GetGlobalGenerator()->GenerateBuildCommand
***************
*** 50,52 ****
    return true;
  }
- 
--- 160,161 ----

Index: cmExtraCodeBlocksGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmExtraCodeBlocksGenerator.cxx,v
retrieving revision 1.28.2.2
retrieving revision 1.28.2.3
diff -C 2 -d -r1.28.2.2 -r1.28.2.3
*** cmExtraCodeBlocksGenerator.cxx	28 Oct 2009 16:15:06 -0000	1.28.2.2
--- cmExtraCodeBlocksGenerator.cxx	28 Jan 2010 21:47:49 -0000	1.28.2.3
***************
*** 546,550 ****
    std::string makefileName = makefile->GetStartOutputDirectory();
    makefileName += "/Makefile";
-   makefileName = cmSystemTools::ConvertToOutputPath(makefileName.c_str());
  
    fout<<"      <Target title=\"" << targetName << "\">\n";
--- 546,549 ----
***************
*** 697,702 ****
    if (strcmp(this->GlobalGenerator->GetName(), "NMake Makefiles")==0)
      {
      command += " /NOLOGO /f &quot;";
!     command += makefile;
      command += "&quot; ";
      command += target;
--- 696,702 ----
    if (strcmp(this->GlobalGenerator->GetName(), "NMake Makefiles")==0)
      {
+     std::string makefileName = cmSystemTools::ConvertToOutputPath(makefile);
      command += " /NOLOGO /f &quot;";
!     command += makefileName;
      command += "&quot; ";
      command += target;
***************
*** 704,716 ****
    else if (strcmp(this->GlobalGenerator->GetName(), "MinGW Makefiles")==0)
      {
!     command += " -f ";
!     command += makefile;
!     command += " ";
      command += target;
      }
    else
      {
      command += " -f &quot;";
!     command += makefile;
      command += "&quot; ";
      command += target;
--- 704,720 ----
    else if (strcmp(this->GlobalGenerator->GetName(), "MinGW Makefiles")==0)
      {
!     // no escaping of spaces in this case, see 
!     // http://public.kitware.com/Bug/view.php?id=10014
!     std::string makefileName = makefile; 
!     command += " -f &quot;";
!     command += makefileName;
!     command += "&quot; ";
      command += target;
      }
    else
      {
+     std::string makefileName = cmSystemTools::ConvertToOutputPath(makefile);
      command += " -f &quot;";
!     command += makefileName;
      command += "&quot; ";
      command += target;

Index: cmLocalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.cxx,v
retrieving revision 1.315.2.2
retrieving revision 1.315.2.3
diff -C 2 -d -r1.315.2.2 -r1.315.2.3
*** cmLocalGenerator.cxx	9 Oct 2009 20:11:14 -0000	1.315.2.2
--- cmLocalGenerator.cxx	28 Jan 2010 21:47:57 -0000	1.315.2.3
***************
*** 713,716 ****
--- 713,719 ----
    std::string langFlags;
    this->AddLanguageFlags(langFlags, llang, 0);
+ #ifdef __APPLE__
+   this->AddArchitectureFlags(langFlags, &target, llang, 0);
+ #endif /* __APPLE__ */
    vars.LanguageCompileFlags = langFlags.c_str();
    
***************
*** 909,912 ****
--- 912,925 ----
        return targetQuoted;
        }
+     if(variable == "TARGET_UNQUOTED")
+       {
+       std::string unquoted = replaceValues.Target;
+       std::string::size_type sz = unquoted.size();
+       if(sz > 2 && unquoted[0] == '\"' && unquoted[sz-1] == '\"')
+         {
+         unquoted = unquoted.substr(1, sz-2);
+         }
+       return unquoted;
+       }
      if(replaceValues.LanguageCompileFlags)
        {
***************
*** 1752,1770 ****
  }
  
  //----------------------------------------------------------------------------
- void cmLocalGenerator::AddLanguageFlags(std::string& flags,
-                                         const char* lang,
-                                         const char* config)
- {
-   // Add language-specific flags.
-   std::string flagsVar = "CMAKE_";
-   flagsVar += lang;
-   flagsVar += "_FLAGS";
-   // Add special OSX flags
  #ifdef __APPLE__
    if(this->EmitUniversalBinaryFlags)
      {
!     const char* osxArch = 
!       this->Makefile->GetDefinition("CMAKE_OSX_ARCHITECTURES");
      const char* sysroot = 
        this->Makefile->GetDefinition("CMAKE_OSX_SYSROOT");
--- 1765,1780 ----
  }
  
+ 
  //----------------------------------------------------------------------------
  #ifdef __APPLE__
+ void cmLocalGenerator::AddArchitectureFlags(std::string& flags,
+                                             cmTarget* target,
+                                             const char *lang,
+                                             const char* config)
+ {
    if(this->EmitUniversalBinaryFlags)
      {
!     std::vector<std::string> archs;
!     target->GetAppleArchs(config, archs);
      const char* sysroot = 
        this->Makefile->GetDefinition("CMAKE_OSX_SYSROOT");
***************
*** 1776,1797 ****
      bool hasIsysroot = this->Makefile->IsOn(isysrootVar.c_str());
      bool flagsUsed = false;
!     if(osxArch && sysroot && lang && (lang[0] =='C' || lang[0] == 'F'))
        {
-       std::vector<std::string> archs;
-       cmSystemTools::ExpandListArgument(std::string(osxArch),
-                                         archs);
-       bool addArchFlag = false;
-       if(archs.size() >= 1)
-         {
-         if(archs[0] != "")
-           {
-           addArchFlag = true;
-           }
-         }
        // if there is more than one arch add the -arch and
        // -isysroot flags, or if there is one arch flag, but
        // it is not the default -arch flag for the system, then
        // add it.  Otherwize do not add -arch and -isysroot
!       if(addArchFlag)
          {
          for( std::vector<std::string>::iterator i = archs.begin();
--- 1786,1796 ----
      bool hasIsysroot = this->Makefile->IsOn(isysrootVar.c_str());
      bool flagsUsed = false;
!     if(!archs.empty() && sysroot && lang && (lang[0] =='C' || lang[0] == 'F'))
        {
        // if there is more than one arch add the -arch and
        // -isysroot flags, or if there is one arch flag, but
        // it is not the default -arch flag for the system, then
        // add it.  Otherwize do not add -arch and -isysroot
!       if(archs[0] != "")
          {
          for( std::vector<std::string>::iterator i = archs.begin();
***************
*** 1824,1828 ****
        }
      }
! #endif
    this->AddConfigVariableFlags(flags, flagsVar.c_str(), config);
  }
--- 1823,1839 ----
        }
      }
! }
! #endif /* __APPLE__ */
! 
! 
! //----------------------------------------------------------------------------
! void cmLocalGenerator::AddLanguageFlags(std::string& flags,
!                                         const char* lang,
!                                         const char* config)
! {
!   // Add language-specific flags.
!   std::string flagsVar = "CMAKE_";
!   flagsVar += lang;
!   flagsVar += "_FLAGS";
    this->AddConfigVariableFlags(flags, flagsVar.c_str(), config);
  }

Index: cmLocalVisualStudio6Generator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio6Generator.h,v
retrieving revision 1.24.2.1
retrieving revision 1.24.2.2
diff -C 2 -d -r1.24.2.1 -r1.24.2.2
*** cmLocalVisualStudio6Generator.h	1 Oct 2009 21:21:06 -0000	1.24.2.1
--- cmLocalVisualStudio6Generator.h	28 Jan 2010 21:47:57 -0000	1.24.2.2
***************
*** 82,85 ****
--- 82,87 ----
    class EventWriter;
    friend class EventWriter;
+   cmsys::auto_ptr<cmCustomCommand>
+   MaybeCreateOutputDir(cmTarget& target, const char* config);
    std::string CreateTargetRules(cmTarget &target, 
                                  const char* configName, 

--- NEW FILE: cmGlobalJOMMakefileGenerator.h ---
/*============================================================================
  CMake - Cross Platform Makefile Generator
  Copyright 2000-2009 Kitware, Inc., Insight Software Consortium

  Distributed under the OSI-approved BSD License (the "License");
  see accompanying file Copyright.txt for details.

  This software is distributed WITHOUT ANY WARRANTY; without even the
  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  See the License for more information.
============================================================================*/
#ifndef cmGlobalJOMMakefileGenerator_h
#define cmGlobalJOMMakefileGenerator_h

#include "cmGlobalUnixMakefileGenerator3.h"

/** \class cmGlobalJOMMakefileGenerator
 * \brief Write a JOM makefiles.
 *
 * cmGlobalJOMMakefileGenerator manages nmake build process for a tree
 */
class cmGlobalJOMMakefileGenerator : public cmGlobalUnixMakefileGenerator3
{
public:
  cmGlobalJOMMakefileGenerator();
  static cmGlobalGenerator* New() {
    return new cmGlobalJOMMakefileGenerator; }
  ///! Get the name for the generator.
  virtual const char* GetName() const {
    return cmGlobalJOMMakefileGenerator::GetActualName();}
  // use NMake Makefiles in the name so that scripts/tests that depend on the
  // name NMake Makefiles will work
  static const char* GetActualName() {return "NMake Makefiles JOM";}

  /** Get the documentation entry for this generator.  */
  virtual void GetDocumentation(cmDocumentationEntry& entry) const;
  
  ///! Create a local generator appropriate to this Global Generator
  virtual cmLocalGenerator *CreateLocalGenerator();

  /**
   * Try to determine system infomation such as shared library
   * extension, pthreads, byte order etc.  
   */
  virtual void EnableLanguage(std::vector<std::string>const& languages,
                              cmMakefile *, bool optional);
};

#endif

Index: cmGlobalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.cxx,v
retrieving revision 1.257.2.2
retrieving revision 1.257.2.3
diff -C 2 -d -r1.257.2.2 -r1.257.2.3
*** cmGlobalGenerator.cxx	9 Oct 2009 20:11:12 -0000	1.257.2.2
--- cmGlobalGenerator.cxx	28 Jan 2010 21:47:50 -0000	1.257.2.3
***************
*** 1762,1766 ****
            &cpackCommandLines, depends, 0);
        }
!     std::string cmd;
      cpackCommandLines.erase(cpackCommandLines.begin(),
        cpackCommandLines.end());
--- 1762,1766 ----
            &cpackCommandLines, depends, 0);
        }
!     std::string cmd = cmakeCommand;
      cpackCommandLines.erase(cpackCommandLines.begin(),
        cpackCommandLines.end());
***************
*** 1783,1798 ****
        {
        // We are building CMake itself.  We cannot use the original
!       // executable to install over itself.
!       cmd = mf->GetDefinition("EXECUTABLE_OUTPUT_PATH");
!       if(cmakeCfgIntDir && *cmakeCfgIntDir && cmakeCfgIntDir[0] != '.')
!         {
!         cmd += "/";
!         cmd += cmakeCfgIntDir;
!         }
!       cmd += "/cmake";
!       }
!     else
!       {
!       cmd = cmakeCommand;
        }
      singleLine.push_back(cmd.c_str());
--- 1783,1789 ----
        {
        // We are building CMake itself.  We cannot use the original
!       // executable to install over itself.  The generator will
!       // automatically convert this name to the build-time location.
!       cmd = "cmake";
        }
      singleLine.push_back(cmd.c_str());

Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CMakeLists.txt,v
retrieving revision 1.428.2.2
retrieving revision 1.428.2.3
diff -C 2 -d -r1.428.2.2 -r1.428.2.3
*** CMakeLists.txt	28 Oct 2009 16:15:06 -0000	1.428.2.2
--- CMakeLists.txt	28 Jan 2010 21:47:49 -0000	1.428.2.3
***************
*** 19,22 ****
--- 19,24 ----
  ENDIF(HAVE_ELF_H)
  
+ SET(EXECUTABLE_OUTPUT_PATH ${CMake_BIN_DIR})
+ 
  # configure the .h file
  CONFIGURE_FILE(
***************
*** 166,169 ****
--- 168,173 ----
    cmExportInstallFileGenerator.h
    cmExportInstallFileGenerator.cxx
+   cmExtraCodeBlocksGenerator.cxx
+   cmExtraCodeBlocksGenerator.h
    cmExtraEclipseCDT4Generator.cxx
    cmExtraEclipseCDT4Generator.h
***************
*** 245,248 ****
--- 249,255 ----
    cmakewizard.cxx
    cmakewizard.h
+ 
+   cm_utf8.h
+   cm_utf8.c
    )
  
***************
*** 252,259 ****
  ENDIF(UNIX)
  
- IF(NOT CYGWIN)
-   SET(SRCS ${SRCS} cmExtraCodeBlocksGenerator.cxx)
- ENDIF(NOT CYGWIN)
- 
  # XCode only works on apple
  IF(APPLE)
--- 259,262 ----
***************
*** 282,285 ****
--- 285,290 ----
        cmGlobalNMakeMakefileGenerator.cxx
        cmGlobalNMakeMakefileGenerator.h
+       cmGlobalJOMMakefileGenerator.cxx
+       cmGlobalJOMMakefileGenerator.h
        cmGlobalVisualStudio6Generator.cxx
        cmGlobalVisualStudio6Generator.h
***************
*** 418,427 ****
    )
  
! IF(WIN32 AND UNIX)
    SET(CPACK_SRCS ${CPACK_SRCS}
      CPack/cmCPackCygwinBinaryGenerator.cxx
      CPack/cmCPackCygwinSourceGenerator.cxx
      )
! ENDIF(WIN32 AND UNIX)
    
  IF(UNIX)
--- 423,432 ----
    )
  
! IF(CYGWIN)
    SET(CPACK_SRCS ${CPACK_SRCS}
      CPack/cmCPackCygwinBinaryGenerator.cxx
      CPack/cmCPackCygwinSourceGenerator.cxx
      )
! ENDIF(CYGWIN)
    
  IF(UNIX)
***************
*** 457,462 ****
  ADD_EXECUTABLE(cmake cmakemain.cxx)
  TARGET_LINK_LIBRARIES(cmake CMakeLib)
- ADD_EXECUTABLE(DumpDocumentation cmDumpDocumentation)
- TARGET_LINK_LIBRARIES(DumpDocumentation CMakeLib)
  
  # Build special executable for running programs on Windows 98
--- 462,465 ----

Index: cmGlobalVisualStudio10Generator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudio10Generator.h,v
retrieving revision 1.4.2.1
retrieving revision 1.4.2.2
diff -C 2 -d -r1.4.2.1 -r1.4.2.2
*** cmGlobalVisualStudio10Generator.h	1 Oct 2009 21:21:03 -0000	1.4.2.1
--- cmGlobalVisualStudio10Generator.h	28 Jan 2010 21:47:50 -0000	1.4.2.2
***************
*** 68,72 ****
    virtual std::string GetUserMacrosRegKeyBase();
    virtual const char* GetCMakeCFGInitDirectory() 
!     { return "$(ConfigurationName)";} 
  protected:
    virtual const char* GetIDEVersion() { return "10.0"; }
--- 68,72 ----
    virtual std::string GetUserMacrosRegKeyBase();
    virtual const char* GetCMakeCFGInitDirectory() 
!     { return "$(Configuration)";}
  protected:
    virtual const char* GetIDEVersion() { return "10.0"; }

Index: cmFileCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFileCommand.cxx,v
retrieving revision 1.136.2.3
retrieving revision 1.136.2.4
diff -C 2 -d -r1.136.2.3 -r1.136.2.4
*** cmFileCommand.cxx	28 Oct 2009 16:15:12 -0000	1.136.2.3
--- cmFileCommand.cxx	28 Jan 2010 21:47:49 -0000	1.136.2.4
***************
*** 190,196 ****
      S_IRUSR | S_IWUSR
  #else
!     S_IRUSR | S_IWUSR |
!     S_IRGRP |
!     S_IROTH
  #endif
      ;
--- 190,194 ----
      S_IRUSR | S_IWUSR
  #else
!     0666
  #endif
      ;
***************
*** 203,207 ****
        S_IREAD | S_IWRITE
  #else
!       S_IRUSR | S_IWUSR
  #endif
      );
--- 201,205 ----
        S_IREAD | S_IWRITE
  #else
!       0666
  #endif
      );

Index: cmDocumentVariables.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDocumentVariables.cxx,v
retrieving revision 1.43.2.1
retrieving revision 1.43.2.2
diff -C 2 -d -r1.43.2.1 -r1.43.2.2
*** cmDocumentVariables.cxx	9 Oct 2009 20:11:12 -0000	1.43.2.1
--- cmDocumentVariables.cxx	28 Jan 2010 21:47:49 -0000	1.43.2.2
***************
*** 202,205 ****
--- 202,213 ----
       "Variables that Provide Information");
    cm->DefineProperty
+     ("CMAKE_EXTRA_GENERATOR", cmProperty::VARIABLE,
+      "The extra generator used to build the project.",
+      "When using the Eclipse, CodeBlocks or KDevelop generators, CMake "
+      "generates Makefiles (CMAKE_GENERATOR) and additionally project files "
+      "for the respective IDE. This IDE project file generator is stored in "
+      "CMAKE_EXTRA_GENERATOR (e.g. \"Eclipse CDT4\").",false,
+      "Variables that Provide Information");
+   cm->DefineProperty
      ("CMAKE_HOME_DIRECTORY", cmProperty::VARIABLE,
       "Path to top of source tree.",
***************
*** 1373,1380 ****
    cm->DefineProperty("CMAKE_SHARED_MODULE_SUFFIX_<LANG>",
                       cmProperty::VARIABLE,0,0);
-   cm->DefineProperty("CMAKE_SHARED_MODULE_RUNTIME_<LANG>_FLAG",
-                      cmProperty::VARIABLE,0,0);
-   cm->DefineProperty("CMAKE_SHARED_MODULE_RUNTIME_<LANG>_FLAG_SEP",
-                      cmProperty::VARIABLE,0,0);
    cm->DefineProperty("CMAKE_STATIC_LIBRARY_PREFIX_<LANG>",
                       cmProperty::VARIABLE,0,0);
--- 1381,1384 ----

Index: cmDocumentation.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDocumentation.h,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
*** cmDocumentation.h	1 Oct 2009 21:20:57 -0000	1.35.2.1
--- cmDocumentation.h	28 Jan 2010 21:47:49 -0000	1.35.2.2
***************
*** 58,61 ****
--- 58,63 ----
    /** Print help of the given type.  */
    bool PrintDocumentation(Type ht, std::ostream& os, const char* docname=0);
+ 
+   void SetShowGenerators(bool showGen) { this->ShowGenerators = showGen; }
    
    /** Set the program name for standard document generation.  */
***************
*** 160,163 ****
--- 162,167 ----
    bool IsOption(const char* arg) const;
  
+   bool ShowGenerators;
+ 
    std::string NameString;
    std::string DocName;

Index: cmGlobalVisualStudioGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudioGenerator.h,v
retrieving revision 1.11.2.2
retrieving revision 1.11.2.3
diff -C 2 -d -r1.11.2.2 -r1.11.2.3
*** cmGlobalVisualStudioGenerator.h	28 Oct 2009 16:15:15 -0000	1.11.2.2
--- cmGlobalVisualStudioGenerator.h	28 Jan 2010 21:47:56 -0000	1.11.2.3
***************
*** 66,69 ****
--- 66,74 ----
    /** Get the top-level registry key for this VS version.  */
    std::string GetRegistryBase();
+ 
+   /** Return true if the generated build tree may contain multiple builds.
+       i.e. "Can I build Debug and Release in the same tree?" */
+   virtual bool IsMultiConfig() { return true; }
+ 
  protected:
    void FixUtilityDepends();

Index: cmInstallTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmInstallTargetGenerator.cxx,v
retrieving revision 1.71.2.1
retrieving revision 1.71.2.2
diff -C 2 -d -r1.71.2.1 -r1.71.2.2
*** cmInstallTargetGenerator.cxx	1 Oct 2009 21:21:05 -0000	1.71.2.1
--- cmInstallTargetGenerator.cxx	28 Jan 2010 21:47:57 -0000	1.71.2.2
***************
*** 76,92 ****
      fromDirConfig += "/";
      }
! 
!   // Compute the full path to the main installed file for this target.
!   NameType nameType = this->ImportLibrary? NameImplib : NameNormal;
!   std::string toInstallPath = this->GetInstallDestination();
!   toInstallPath += "/";
!   toInstallPath += this->GetInstallFilename(this->Target, config, nameType);
! 
!   // Track whether post-install operations should be added to the
!   // script.
!   bool tweakInstalledFile = true;
  
    // Compute the list of files to install for this target.
!   std::vector<std::string> files;
    std::string literal_args;
    cmTarget::TargetType type = this->Target->GetType();
--- 76,85 ----
      fromDirConfig += "/";
      }
!   std::string toDir = this->GetInstallDestination();
!   toDir += "/";
  
    // Compute the list of files to install for this target.
!   std::vector<std::string> filesFrom;
!   std::vector<std::string> filesTo;
    std::string literal_args;
    cmTarget::TargetType type = this->Target->GetType();
***************
*** 105,111 ****
      if(this->ImportLibrary)
        {
!       std::string from1 = fromDirConfig;
!       from1 += targetNameImport;
!       files.push_back(from1);
  
        // An import library looks like a static library.
--- 98,105 ----
      if(this->ImportLibrary)
        {
!       std::string from1 = fromDirConfig + targetNameImport;
!       std::string to1 = toDir + targetNameImport;
!       filesFrom.push_back(from1);
!       filesTo.push_back(to1);
  
        // An import library looks like a static library.
***************
*** 114,151 ****
      else
        {
!       std::string from1 = fromDirConfig;
!       from1 += targetName;
  
        // Handle OSX Bundles.
        if(this->Target->IsAppBundleOnApple())
          {
!         // Compute the source locations of the bundle executable and
!         // Info.plist file.
!         from1 += ".app";
!         files.push_back(from1);
          type = cmTarget::INSTALL_DIRECTORY;
-         // Need to apply install_name_tool and stripping to binary
-         // inside bundle.
-         toInstallPath += ".app/Contents/MacOS/";
-         toInstallPath +=
-           this->GetInstallFilename(this->Target, config, nameType);
          literal_args += " USE_SOURCE_PERMISSIONS";
          }
        else
          {
!         // Operations done at install time on the installed file should
!         // be done on the real file and not any of the symlinks.
!         toInstallPath = this->GetInstallDestination();
!         toInstallPath += "/";
!         toInstallPath += targetNameReal;
! 
!         files.push_back(from1);
          if(targetNameReal != targetName)
            {
!           std::string from2 = fromDirConfig;
!           from2 += targetNameReal;
!           files.push_back(from2);
            }
          }
        }
      }
--- 108,140 ----
      else
        {
!       std::string from1 = fromDirConfig + targetName;
!       std::string to1 = toDir + targetName;
  
        // Handle OSX Bundles.
        if(this->Target->IsAppBundleOnApple())
          {
!         // Install the whole app bundle directory.
          type = cmTarget::INSTALL_DIRECTORY;
          literal_args += " USE_SOURCE_PERMISSIONS";
+         from1 += ".app";
+ 
+         // Tweaks apply to the binary inside the bundle.
+         to1 += ".app/Contents/MacOS/";
+         to1 += targetName;
          }
        else
          {
!         // Tweaks apply to the real file, so list it first.
          if(targetNameReal != targetName)
            {
!           std::string from2 = fromDirConfig + targetNameReal;
!           std::string to2 = toDir += targetNameReal;
!           filesFrom.push_back(from2);
!           filesTo.push_back(to2);
            }
          }
+ 
+       filesFrom.push_back(from1);
+       filesTo.push_back(to1);
        }
      }
***************
*** 165,171 ****
        assert(this->NamelinkMode == NamelinkModeNone);
  
!       std::string from1 = fromDirConfig;
!       from1 += targetNameImport;
!       files.push_back(from1);
  
        // An import library looks like a static library.
--- 154,161 ----
        assert(this->NamelinkMode == NamelinkModeNone);
  
!       std::string from1 = fromDirConfig + targetNameImport;
!       std::string to1 = toDir + targetNameImport;
!       filesFrom.push_back(from1);
!       filesTo.push_back(to1);
  
        // An import library looks like a static library.
***************
*** 177,225 ****
        assert(this->NamelinkMode == NamelinkModeNone);
  
!       // Compute the build tree location of the framework directory
!       std::string from1 = fromDirConfig;
!       from1 += targetName;
!       from1 += ".framework";
!       files.push_back(from1);
! 
        type = cmTarget::INSTALL_DIRECTORY;
  
!       // Need to apply install_name_tool and stripping to binary
!       // inside framework.
!       toInstallPath += ".framework/Versions/";
!       toInstallPath += this->Target->GetFrameworkVersion();
!       toInstallPath += "/";
!       toInstallPath += this->GetInstallFilename(this->Target, config,
!                                                 NameNormal);
  
!       literal_args += " USE_SOURCE_PERMISSIONS";
        }
      else
        {
-       // Operations done at install time on the installed file should
-       // be done on the real file and not any of the symlinks.
-       toInstallPath = this->GetInstallDestination();
-       toInstallPath += "/";
-       toInstallPath += targetNameReal;
- 
-       // Construct the list of file names to install for this library.
        bool haveNamelink = false;
!       std::string fromName;
        std::string fromSOName;
!       std::string fromRealName;
!       fromName = fromDirConfig;
!       fromName += targetName;
        if(targetNameSO != targetName)
          {
          haveNamelink = true;
!         fromSOName = fromDirConfig;
!         fromSOName += targetNameSO;
          }
        if(targetNameReal != targetName &&
           targetNameReal != targetNameSO)
          {
          haveNamelink = true;
!         fromRealName = fromDirConfig;
!         fromRealName += targetNameReal;
          }
  
--- 167,212 ----
        assert(this->NamelinkMode == NamelinkModeNone);
  
!       // Install the whole framework directory.
        type = cmTarget::INSTALL_DIRECTORY;
+       literal_args += " USE_SOURCE_PERMISSIONS";
+       std::string from1 = fromDirConfig + targetName + ".framework";
  
!       // Tweaks apply to the binary inside the bundle.
!       std::string to1 = toDir + targetName;
!       to1 += ".framework/Versions/";
!       to1 += this->Target->GetFrameworkVersion();
!       to1 += "/";
!       to1 += targetName;
  
!       filesFrom.push_back(from1);
!       filesTo.push_back(to1);
        }
      else
        {
        bool haveNamelink = false;
! 
!       // Library link name.
!       std::string fromName = fromDirConfig + targetName;
!       std::string toName = toDir + targetName;
! 
!       // Library interface name.
        std::string fromSOName;
!       std::string toSOName;
        if(targetNameSO != targetName)
          {
          haveNamelink = true;
!         fromSOName = fromDirConfig + targetNameSO;
!         toSOName = toDir + targetNameSO;
          }
+ 
+       // Library implementation name.
+       std::string fromRealName;
+       std::string toRealName;
        if(targetNameReal != targetName &&
           targetNameReal != targetNameSO)
          {
          haveNamelink = true;
!         fromRealName = fromDirConfig + targetNameReal;
!         toRealName = toDir + targetNameReal;
          }
  
***************
*** 231,236 ****
            {
            // Install the namelink only.
!           files.push_back(fromName);
!           tweakInstalledFile = false;
            }
          else
--- 218,223 ----
            {
            // Install the namelink only.
!           filesFrom.push_back(fromName);
!           filesTo.push_back(toName);
            }
          else
***************
*** 239,243 ****
            if(!fromRealName.empty())
              {
!             files.push_back(fromRealName);
              }
  
--- 226,231 ----
            if(!fromRealName.empty())
              {
!             filesFrom.push_back(fromRealName);
!             filesTo.push_back(toRealName);
              }
  
***************
*** 245,249 ****
            if(!fromSOName.empty())
              {
!             files.push_back(fromSOName);
              }
  
--- 233,238 ----
            if(!fromSOName.empty())
              {
!             filesFrom.push_back(fromSOName);
!             filesTo.push_back(toSOName);
              }
  
***************
*** 251,255 ****
            if(this->NamelinkMode != NamelinkModeSkip)
              {
!             files.push_back(fromName);
              }
            }
--- 240,245 ----
            if(this->NamelinkMode != NamelinkModeSkip)
              {
!             filesFrom.push_back(fromName);
!             filesTo.push_back(toName);
              }
            }
***************
*** 261,265 ****
          if(this->NamelinkMode != NamelinkModeOnly)
            {
!           files.push_back(fromName);
            }
          }
--- 251,256 ----
          if(this->NamelinkMode != NamelinkModeOnly)
            {
!           filesFrom.push_back(fromName);
!           filesTo.push_back(toName);
            }
          }
***************
*** 267,301 ****
      }
  
    // Skip this rule if no files are to be installed for the target.
!   if(files.empty())
      {
      return;
      }
  
-   // Construct the path of the file on disk after installation on
-   // which tweaks may be performed.
-   std::string toDestDirPath = "$ENV{DESTDIR}";
-   if(toInstallPath[0] != '/' && toInstallPath[0] != '$')
-     {
-     toDestDirPath += "/";
-     }
-   toDestDirPath += toInstallPath;
- 
    // Add pre-installation tweaks.
!   if(tweakInstalledFile)
!     {
!     // Collect tweaking rules.
!     cmOStringStream tw;
!     this->AddRPathCheckRule(tw, indent.Next(), config, toDestDirPath);
!     std::string tws = tw.str();
! 
!     // Add the rules, if any.
!     if(!tws.empty())
!       {
!       os << indent << "IF(EXISTS \"" << toDestDirPath << "\")\n";
!       os << tws;
!       os << indent << "ENDIF(EXISTS \"" << toDestDirPath << "\")\n";
!       }
!     }
  
    // Write code to install the target file.
--- 258,273 ----
      }
  
+   // If this fails the above code is buggy.
+   assert(filesFrom.size() == filesTo.size());
+ 
    // Skip this rule if no files are to be installed for the target.
!   if(filesFrom.empty())
      {
      return;
      }
  
    // Add pre-installation tweaks.
!   this->AddTweak(os, indent, config, filesTo,
!                  &cmInstallTargetGenerator::PreReplacementTweaks);
  
    // Write code to install the target file.
***************
*** 303,307 ****
    const char* no_rename = 0;
    bool optional = this->Optional || this->ImportLibrary;
!   this->AddInstallRule(os, type, files,
                         optional,
                         this->FilePermissions.c_str(), no_dir_permissions,
--- 275,279 ----
    const char* no_rename = 0;
    bool optional = this->Optional || this->ImportLibrary;
!   this->AddInstallRule(os, type, filesFrom,
                         optional,
                         this->FilePermissions.c_str(), no_dir_permissions,
***************
*** 310,331 ****
  
    // Add post-installation tweaks.
!   if(tweakInstalledFile)
!     {
!     // Collect tweaking rules.
!     cmOStringStream tw;
!     this->AddInstallNamePatchRule(tw, indent.Next(), config, toDestDirPath);
!     this->AddChrpathPatchRule(tw, indent.Next(), config, toDestDirPath);
!     this->AddRanlibRule(tw, indent.Next(), type, toDestDirPath);
!     this->AddStripRule(tw, indent.Next(), type, toDestDirPath);
!     std::string tws = tw.str();
! 
!     // Add the rules, if any.
!     if(!tws.empty())
!       {
!       os << indent << "IF(EXISTS \"" << toDestDirPath << "\")\n";
!       os << tws;
!       os << indent << "ENDIF(EXISTS \"" << toDestDirPath << "\")\n";
!       }
!     }
  }
  
--- 282,287 ----
  
    // Add post-installation tweaks.
!   this->AddTweak(os, indent, config, filesTo,
!                  &cmInstallTargetGenerator::PostReplacementTweaks);
  }
  
***************
*** 409,412 ****
--- 365,454 ----
  void
  cmInstallTargetGenerator
+ ::AddTweak(std::ostream& os, Indent const& indent, const char* config,
+            std::string const& file, TweakMethod tweak)
+ {
+   cmOStringStream tw;
+   (this->*tweak)(tw, indent.Next(), config, file);
+   std::string tws = tw.str();
+   if(!tws.empty())
+     {
+     os << indent << "IF(EXISTS \"" << file << "\" AND\n"
+        << indent << "   NOT IS_SYMLINK \"" << file << "\")\n";
+     os << tws;
+     os << indent << "ENDIF()\n";
+     }
+ }
+ 
+ //----------------------------------------------------------------------------
+ void
+ cmInstallTargetGenerator
+ ::AddTweak(std::ostream& os, Indent const& indent, const char* config,
+            std::vector<std::string> const& files, TweakMethod tweak)
+ {
+   if(files.size() == 1)
+     {
+     // Tweak a single file.
+     this->AddTweak(os, indent, config, this->GetDestDirPath(files[0]), tweak);
+     }
+   else
+     {
+     // Generate a foreach loop to tweak multiple files.
+     cmOStringStream tw;
+     this->AddTweak(tw, indent.Next(), config, "${file}", tweak);
+     std::string tws = tw.str();
+     if(!tws.empty())
+       {
+       Indent indent2 = indent.Next().Next();
+       os << indent << "FOREACH(file\n";
+       for(std::vector<std::string>::const_iterator i = files.begin();
+           i != files.end(); ++i)
+         {
+         os << indent2 << "\"" << this->GetDestDirPath(*i) << "\"\n";
+         }
+       os << indent2 << ")\n";
+       os << tws;
+       os << indent << "ENDFOREACH()\n";
+       }
+     }
+ }
+ 
+ //----------------------------------------------------------------------------
+ std::string cmInstallTargetGenerator::GetDestDirPath(std::string const& file)
+ {
+   // Construct the path of the file on disk after installation on
+   // which tweaks may be performed.
+   std::string toDestDirPath = "$ENV{DESTDIR}";
+   if(file[0] != '/' && file[0] != '$')
+     {
+     toDestDirPath += "/";
+     }
+   toDestDirPath += file;
+   return toDestDirPath;
+ }
+ 
+ //----------------------------------------------------------------------------
+ void cmInstallTargetGenerator::PreReplacementTweaks(std::ostream& os,
+                                                     Indent const& indent,
+                                                     const char* config,
+                                                     std::string const& file)
+ {
+   this->AddRPathCheckRule(os, indent, config, file);
+ }
+ 
+ //----------------------------------------------------------------------------
+ void cmInstallTargetGenerator::PostReplacementTweaks(std::ostream& os,
+                                                      Indent const& indent,
+                                                      const char* config,
+                                                      std::string const& file)
+ {
+   this->AddInstallNamePatchRule(os, indent, config, file);
+   this->AddChrpathPatchRule(os, indent, config, file);
+   this->AddRanlibRule(os, indent, file);
+   this->AddStripRule(os, indent, file);
+ }
+ 
+ //----------------------------------------------------------------------------
+ void
+ cmInstallTargetGenerator
  ::AddInstallNamePatchRule(std::ostream& os, Indent const& indent,
                            const char* config, std::string const& toDestDirPath)
***************
*** 600,604 ****
  cmInstallTargetGenerator::AddStripRule(std::ostream& os,
                                         Indent const& indent,
-                                        cmTarget::TargetType type,
                                         const std::string& toDestDirPath)
  {
--- 642,645 ----
***************
*** 606,610 ****
    // don't strip static libraries, because it removes the only symbol table
    // they have so you can't link to them anymore
!   if(type == cmTarget::STATIC_LIBRARY)
      {
      return;
--- 647,651 ----
    // don't strip static libraries, because it removes the only symbol table
    // they have so you can't link to them anymore
!   if(this->Target->GetType() == cmTarget::STATIC_LIBRARY)
      {
      return;
***************
*** 634,642 ****
  cmInstallTargetGenerator::AddRanlibRule(std::ostream& os,
                                          Indent const& indent,
-                                         cmTarget::TargetType type,
                                          const std::string& toDestDirPath)
  {
    // Static libraries need ranlib on this platform.
!   if(type != cmTarget::STATIC_LIBRARY)
      {
      return;
--- 675,682 ----
  cmInstallTargetGenerator::AddRanlibRule(std::ostream& os,
                                          Indent const& indent,
                                          const std::string& toDestDirPath)
  {
    // Static libraries need ranlib on this platform.
!   if(this->Target->GetType() != cmTarget::STATIC_LIBRARY)
      {
      return;

Index: ctest.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/ctest.cxx,v
retrieving revision 1.108.2.2
retrieving revision 1.108.2.3
diff -C 2 -d -r1.108.2.2 -r1.108.2.3
*** ctest.cxx	11 Nov 2009 18:34:16 -0000	1.108.2.2
--- ctest.cxx	28 Jan 2010 21:48:00 -0000	1.108.2.3
***************
*** 124,129 ****
     "configuration",
     "This option does the same operations as -S but it will do them in a "
!    "seperate process. This is primarily useful in cases where the script "
!    "may modify the environment and you do not want the modified enviroment "
     "to impact other -S scripts."},
    {"-A <file>, --add-notes <file>", "Add a notes file with submission",
--- 124,129 ----
     "configuration",
     "This option does the same operations as -S but it will do them in a "
!    "separate process. This is primarily useful in cases where the script "
!    "may modify the environment and you do not want the modified environment "
     "to impact other -S scripts."},
    {"-A <file>, --add-notes <file>", "Add a notes file with submission",
***************
*** 142,146 ****
    {"--max-width <width>", "Set the max width for a test name to output",
     "Set the maximum width for each test name to show in the output.  This "
!    "allows the user to widen the output to avoid cliping the test name which "
     "can be very annoying."},
    {"--interactive-debug-mode [0|1]", "Set the interactive mode to 0 or 1.",
--- 142,146 ----
    {"--max-width <width>", "Set the max width for a test name to output",
     "Set the maximum width for each test name to show in the output.  This "
!    "allows the user to widen the output to avoid clipping the test name which "
     "can be very annoying."},
    {"--interactive-debug-mode [0|1]", "Set the interactive mode to 0 or 1.",
***************
*** 182,187 ****
    {"--build-noclean", "Skip the make clean step.", "" },
    {"--build-config-sample", 
!    "A sample executable to use to determine the configuraiton", 
!    "A sample executable to use to determine the configuraiton that "
     "should be used. e.g. Debug/Release/etc" },
    {"--build-options", "Add extra options to the build step.",
--- 182,187 ----
    {"--build-noclean", "Skip the make clean step.", "" },
    {"--build-config-sample", 
!    "A sample executable to use to determine the configuration", 
!    "A sample executable to use to determine the configuration that "
     "should be used. e.g. Debug/Release/etc" },
    {"--build-options", "Add extra options to the build step.",
***************
*** 209,216 ****
--- 209,229 ----
     "If this behavior is not desired, this argument will enforce new "
     "processes for child CTest processes." },
+   {"--schedule-random", "Use a random order for scheduling tests",
+    "This option will run the tests in a random order. It is commonly used to "
+    "detect implicit dependencies in a test suite." },
    {"--submit-index", "Submit individual dashboard tests with specific index",
     "This option allows performing the same CTest action (such as test) "
     "multiple times and submit all stages to the same dashboard (Dart2 "
     "required). Each execution requires different index." },
+   {"--timeout <seconds>", "Set a global timeout on all tests.",
+    "This option will set a global timeout on all tests that do not already "
+    "have a timeout set on them."},
+   {"--http1.0", "Submit using HTTP 1.0.",
+   "This option will force CTest to use HTTP 1.0 to submit files to the "
+   "dashboard, instead of HTTP 1.1."},
+   {"--no-compress-output", "Do not compress test output when submitting.",
+    "This flag will turn off automatic compression of test output.  Use this "
+    "to maintain compatibility with an older version of CDash which doesn't "
+    "support compressed test output."},
    {"--help-command <cmd> [<file>]", "Show help for a single command and exit.",
     "Prints the help for the command to stdout or to the specified file." },
***************
*** 277,280 ****
--- 290,294 ----
        ch->GetCommandDocumentation(commands);
  
+       doc.SetShowGenerators(false);
        doc.SetName("ctest");
        doc.SetSection("Name",cmDocumentationName);

Index: cmWriteFileCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmWriteFileCommand.cxx,v
retrieving revision 1.17.2.1
retrieving revision 1.17.2.2
diff -C 2 -d -r1.17.2.1 -r1.17.2.2
*** cmWriteFileCommand.cxx	1 Oct 2009 21:21:10 -0000	1.17.2.1
--- cmWriteFileCommand.cxx	28 Jan 2010 21:48:00 -0000	1.17.2.2
***************
*** 61,67 ****
      S_IRUSR | S_IWUSR
  #else
!     S_IRUSR | S_IWUSR |
!     S_IRGRP |
!     S_IROTH
  #endif
      ;
--- 61,65 ----
      S_IRUSR | S_IWUSR
  #else
!     0666
  #endif
      ;
***************
*** 74,78 ****
        S_IREAD | S_IWRITE
  #else
!       S_IRUSR | S_IWUSR
  #endif
      );
--- 72,76 ----
        S_IREAD | S_IWRITE
  #else
!       0666
  #endif
      );

Index: cmGlobalVisualStudio7Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudio7Generator.cxx,v
retrieving revision 1.108.2.3
retrieving revision 1.108.2.4
diff -C 2 -d -r1.108.2.3 -r1.108.2.4
*** cmGlobalVisualStudio7Generator.cxx	28 Oct 2009 16:15:13 -0000	1.108.2.3
--- cmGlobalVisualStudio7Generator.cxx	28 Jan 2010 21:47:52 -0000	1.108.2.4
***************
*** 32,36 ****
    mf->AddDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV", "1");
    mf->AddDefinition("CMAKE_GENERATOR_FC", "ifort");
- 
    this->AddPlatformDefinitions(mf);
    
--- 32,35 ----
***************
*** 60,63 ****
--- 59,64 ----
  {
    mf->AddDefinition("MSVC70", "1");
+   mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "X86");
+   mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "X86");
  }
  

Index: cmGetFilenameComponentCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGetFilenameComponentCommand.cxx,v
retrieving revision 1.21.2.1
retrieving revision 1.21.2.2
diff -C 2 -d -r1.21.2.1 -r1.21.2.2
*** cmGetFilenameComponentCommand.cxx	1 Oct 2009 21:21:00 -0000	1.21.2.1
--- cmGetFilenameComponentCommand.cxx	28 Jan 2010 21:47:50 -0000	1.21.2.2
***************
*** 102,106 ****
        {
        // Resolve symlinks if possible
!       result = cmSystemTools::GetRealPath(filename.c_str());
        }
      }
--- 102,106 ----
        {
        // Resolve symlinks if possible
!       result = cmSystemTools::GetRealPath(result.c_str());
        }
      }

Index: cmAddTestCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmAddTestCommand.h,v
retrieving revision 1.18.2.1
retrieving revision 1.18.2.2
diff -C 2 -d -r1.18.2.1 -r1.18.2.2
*** cmAddTestCommand.h	1 Oct 2009 21:20:36 -0000	1.18.2.1
--- cmAddTestCommand.h	28 Jan 2010 21:47:49 -0000	1.18.2.2
***************
*** 57,61 ****
      {
      return
!       "  add_test(testname Exename arg1 arg2 ...)\n"
        "If the ENABLE_TESTING command has been run, this command adds a "
        "test target to the current directory. If ENABLE_TESTING has not "
--- 57,61 ----
      {
      return
!       "  add_test(testname Exename arg1 arg2 ... )\n"
        "If the ENABLE_TESTING command has been run, this command adds a "
        "test target to the current directory. If ENABLE_TESTING has not "
***************
*** 66,70 ****
        "system (like tclsh).  The test will be run with the current working "
        "directory set to the CMakeList.txt files corresponding directory "
!       "in the binary tree."
        "\n"
        "  add_test(NAME <name> [CONFIGURATIONS [Debug|Release|...]]\n"
--- 66,70 ----
        "system (like tclsh).  The test will be run with the current working "
        "directory set to the CMakeList.txt files corresponding directory "
!       "in the binary tree.\n"
        "\n"
        "  add_test(NAME <name> [CONFIGURATIONS [Debug|Release|...]]\n"

--- NEW FILE: cm_utf8.h ---
/*============================================================================
  CMake - Cross Platform Makefile Generator
  Copyright 2000-2009 Kitware, Inc., Insight Software Consortium

  Distributed under the OSI-approved BSD License (the "License");
  see accompanying file Copyright.txt for details.

  This software is distributed WITHOUT ANY WARRANTY; without even the
  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  See the License for more information.
============================================================================*/
#ifndef cm_utf8_h
#define cm_utf8_h

#ifdef __cplusplus
extern "C" {
#endif

/** Decode one UTF-8 character from the input byte range.  On success,
    stores the unicode character number in *pc and returns the first
    position not extracted.  On failure, returns 0.  */
const char* cm_utf8_decode_character(const char* first, const char* last,
                                     unsigned int* pc);

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif

Index: cmTest.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTest.cxx,v
retrieving revision 1.16.2.1
retrieving revision 1.16.2.2
diff -C 2 -d -r1.16.2.1 -r1.16.2.2
*** cmTest.cxx	1 Oct 2009 21:21:09 -0000	1.16.2.1
--- cmTest.cxx	28 Jan 2010 21:48:00 -0000	1.16.2.2
***************
*** 98,101 ****
--- 98,126 ----
  {
    cm->DefineProperty
+     ("ATTACHED_FILES", cmProperty::TEST,
+      "Attach a list of files to a dashboard submission.",
+      "Set this property to a list of files that will be encoded and "
+      "submitted to the dashboard as an addition to the test result.");
+ 
+   cm->DefineProperty
+     ("ATTACHED_FILES_ON_FAIL", cmProperty::TEST,
+      "Attach a list of files to a dashboard submission if the test fails.",
+      "Same as ATTACHED_FILES, but these files will only be included if the "
+      "test does not pass.");
+ 
+   cm->DefineProperty
+     ("COST", cmProperty::TEST,
+      "Set this to a floating point value. Tests in a test set will be "
+      "run in descending order of cost.", "This property describes the cost "
+      "of a test. You can explicitly set this value; tests with higher COST "
+      "values will run first.");
+ 
+   cm->DefineProperty
+     ("DEPENDS", cmProperty::TEST,
+      "Specifies that this test should only be run after the specified "
+      "list of tests.",
+      "Set this to a list of tests that must finish before this test is run.");
+ 
+   cm->DefineProperty
      ("ENVIRONMENT", cmProperty::TEST,
       "Specify environment variables that should be defined for running "
***************
*** 133,136 ****
--- 158,181 ----
  
    cm->DefineProperty
+     ("PROCESSORS", cmProperty::TEST,
+      "How many process slots this test requires",
+      "Denotes the number of processors that this test will require. This is "
+      "typically used for MPI tests, and should be used in conjunction with "
+      "the ctest_test PARALLEL_LEVEL option.");
+ 
+   cm->DefineProperty
+     ("REQUIRED_FILES", cmProperty::TEST,
+      "List of files required to run the test.",
+      "If set to a list of files, the test will not be run unless all of the "
+      "files exist.");
+ 
+   cm->DefineProperty
+     ("RUN_SERIAL", cmProperty::TEST,
+      "Do not run this test in parallel with any other test.",
+      "Use this option in conjunction with the ctest_test PARALLEL_LEVEL "
+      "option to specify that this test should not be run in parallel with "
+      "any other tests.");
+ 
+   cm->DefineProperty
      ("TIMEOUT", cmProperty::TEST, 
       "How many seconds to allow for this test.",

Index: cmPolicies.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmPolicies.h,v
retrieving revision 1.26.2.3
retrieving revision 1.26.2.4
diff -C 2 -d -r1.26.2.3 -r1.26.2.4
*** cmPolicies.h	28 Oct 2009 16:15:24 -0000	1.26.2.3
--- cmPolicies.h	28 Jan 2010 21:47:58 -0000	1.26.2.4
***************
*** 51,54 ****
--- 51,55 ----
      CMP0013, // Duplicate binary directories not allowed
      CMP0014, // Input directories must have CMakeLists.txt
+     CMP0015, // link_directories() treats paths relative to source dir
  
      // Always the last entry.  Useful mostly to avoid adding a comma

Index: cmFindPackageCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindPackageCommand.cxx,v
retrieving revision 1.62.2.2
retrieving revision 1.62.2.3
diff -C 2 -d -r1.62.2.2 -r1.62.2.3
*** cmFindPackageCommand.cxx	9 Oct 2009 20:11:12 -0000	1.62.2.2
--- cmFindPackageCommand.cxx	28 Jan 2010 21:47:50 -0000	1.62.2.3
***************
*** 269,272 ****
--- 269,273 ----
      "These are intended to be set in the user's shell configuration.  "
      "This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.\n"
+     "   <package>_DIR\n"
      "   CMAKE_PREFIX_PATH\n"
      "   CMAKE_FRAMEWORK_PATH\n"

Index: cmCTest.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCTest.cxx,v
retrieving revision 1.370.2.2
retrieving revision 1.370.2.3
diff -C 2 -d -r1.370.2.2 -r1.370.2.3
*** cmCTest.cxx	28 Oct 2009 16:15:06 -0000	1.370.2.2
--- cmCTest.cxx	28 Jan 2010 21:47:49 -0000	1.370.2.3
***************
*** 24,27 ****
--- 24,28 ----
  #include "cmVersionMacros.h"
  #include "cmCTestCommand.h"
+ #include "cmCTestStartCommand.h"
  
  #include "cmCTestBuildHandler.h"
***************
*** 154,157 ****
--- 155,230 ----
  }
  
+ #ifdef CMAKE_BUILD_WITH_CMAKE
+ //----------------------------------------------------------------------------
+ static size_t
+ HTTPResponseCallback(void *ptr, size_t size, size_t nmemb, void *data)
+ {
+   register int realsize = (int)(size * nmemb);
+ 
+   std::string *response
+     = static_cast<std::string*>(data);
+   const char* chPtr = static_cast<char*>(ptr);
+   *response += chPtr;
+ 
+   return realsize;
+ }
+ 
+ //----------------------------------------------------------------------------
+ int cmCTest::HTTPRequest(std::string url, HTTPMethod method,
+                                        std::string& response,
+                                        std::string fields,
+                                        std::string putFile, int timeout)
+ {
+   CURL* curl;
+   FILE* file;
+   ::curl_global_init(CURL_GLOBAL_ALL);
+   curl = ::curl_easy_init();
+ 
+   //set request options based on method
+   switch(method)
+     {
+     case cmCTest::HTTP_POST:
+       ::curl_easy_setopt(curl, CURLOPT_POST, 1);
+       ::curl_easy_setopt(curl, CURLOPT_POSTFIELDS, fields.c_str());
+       break;
+     case cmCTest::HTTP_PUT:
+       if(!cmSystemTools::FileExists(putFile.c_str()))
+         {
+         response = "Error: File ";
+         response += putFile + " does not exist.\n";
+         return -1;
+         }
+       ::curl_easy_setopt(curl, CURLOPT_PUT, 1);
+       file = ::fopen(putFile.c_str(), "rb");
+       ::curl_easy_setopt(curl, CURLOPT_INFILE, file);
+       //fall through to append GET fields
+     case cmCTest::HTTP_GET:
+       if(fields.size())
+         {
+         url += "?" + fields;
+         }
+       break;
+     default:
+       break;
+     }
+   
+   ::curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
+   ::curl_easy_setopt(curl, CURLOPT_TIMEOUT, timeout);
+   ::curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
+ 
+   //set response options
+   ::curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, HTTPResponseCallback);
+   ::curl_easy_setopt(curl, CURLOPT_FILE, (void *)&response);
+   ::curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1);
+ 
+   CURLcode res = ::curl_easy_perform(curl);
+ 
+   ::curl_easy_cleanup(curl);
+   ::curl_global_cleanup();
+   
+   return static_cast<int>(res);
+ }
+ #endif
+ 
  //----------------------------------------------------------------------
  std::string cmCTest::MakeURLSafe(const std::string& str)
***************
*** 220,229 ****
--- 293,307 ----
    this->ShowOnly               = false;
    this->RunConfigurationScript = false;
+   this->UseHTTP10              = false;
+   this->CompressTestOutput     = true;
+   this->ComputedCompressOutput = false;
    this->TestModel              = cmCTest::EXPERIMENTAL;
    this->MaxTestNameWidth       = 30;
    this->InteractiveDebugMode   = true;
    this->TimeOut                = 0;
+   this->GlobalTimeout          = 0;
    this->CompressXMLFiles       = false;
    this->CTestConfigFile        = "";
+   this->ScheduleType           = "";
    this->OutputLogFile          = 0;
    this->OutputLogFileLastTag   = -1;
***************
*** 296,299 ****
--- 374,411 ----
  
  //----------------------------------------------------------------------------
+ bool cmCTest::ShouldCompressTestOutput()
+ {
+   if(!this->ComputedCompressOutput)
+     {
+     std::string cdashVersion = this->GetCDashVersion();
+     //version >= 1.6?
+     bool cdashSupportsGzip = cmSystemTools::VersionCompare(
+       cmSystemTools::OP_GREATER, cdashVersion.c_str(), "1.6") ||
+       cmSystemTools::VersionCompare(cmSystemTools::OP_EQUAL,
+       cdashVersion.c_str(), "1.6");
+     this->CompressTestOutput &= cdashSupportsGzip;
+     this->ComputedCompressOutput = true;
+     }
+   return this->CompressTestOutput;
+ }
+ 
+ //----------------------------------------------------------------------------
+ std::string cmCTest::GetCDashVersion()
+ {
+ #ifdef CMAKE_BUILD_WITH_CMAKE
+   //First query the server.  If that fails, fall back to the local setting
+   std::string response;
+   std::string url = "http://";
+   url += this->GetCTestConfiguration("DropSite") + "/CDash/api/getversion.php";
+   
+   int res = cmCTest::HTTPRequest(url, cmCTest::HTTP_GET, response);
+   
+   return res ? this->GetCTestConfiguration("CDashVersion") : response;
+ #else
+   return this->GetCTestConfiguration("CDashVersion");
+ #endif
+ }
+ 
+ //----------------------------------------------------------------------------
  cmCTest::Part cmCTest::GetPartFromName(const char* name)
  {
***************
*** 311,316 ****
  
  //----------------------------------------------------------------------
! int cmCTest::Initialize(const char* binary_dir, bool new_tag,
!   bool verbose_tag)
  {
    cmCTestLog(this, DEBUG, "Here: " << __LINE__ << std::endl);
--- 423,427 ----
  
  //----------------------------------------------------------------------
! int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
  {
    cmCTestLog(this, DEBUG, "Here: " << __LINE__ << std::endl);
***************
*** 363,366 ****
--- 474,479 ----
    if ( this->ProduceXML )
      {
+     // Verify "Testing" directory exists:
+     //
      std::string testingDir = this->BinaryDir + "/Testing";
      if ( cmSystemTools::FileExists(testingDir.c_str()) )
***************
*** 382,463 ****
          }
        }
      std::string tagfile = testingDir + "/TAG";
      std::ifstream tfin(tagfile.c_str());
      std::string tag;
!     time_t tctime = time(0);
!     if ( this->TomorrowTag )
!       {
!       tctime += ( 24 * 60 * 60 );
!       }
!     struct tm *lctime = gmtime(&tctime);
!     if ( tfin && cmSystemTools::GetLineFromStream(tfin, tag) )
        {
!       int year = 0;
!       int mon = 0;
!       int day = 0;
!       int hour = 0;
!       int min = 0;
!       sscanf(tag.c_str(), "%04d%02d%02d-%02d%02d",
!              &year, &mon, &day, &hour, &min);
!       if ( year != lctime->tm_year + 1900 ||
!            mon != lctime->tm_mon+1 ||
!            day != lctime->tm_mday )
          {
!         tag = "";
          }
!       std::string tagmode;
!       if ( cmSystemTools::GetLineFromStream(tfin, tagmode) )
          {
!         if (tagmode.size() > 4 && !this->Parts[PartStart])
            {
!           this->TestModel = cmCTest::GetTestModelFromString(tagmode.c_str());
            }
          }
!       tfin.close();
!       }
!     if (tag.size() == 0 || new_tag || this->Parts[PartStart])
!       {
!       cmCTestLog(this, DEBUG, "TestModel: " << this->GetTestModelString()
!         << std::endl);
!       cmCTestLog(this, DEBUG, "TestModel: " << this->TestModel << std::endl);
!       if ( this->TestModel == cmCTest::NIGHTLY )
          {
!         lctime = this->GetNightlyTime(
!           this->GetCTestConfiguration("NightlyStartTime"), this->TomorrowTag);
          }
!       char datestring[100];
!       sprintf(datestring, "%04d%02d%02d-%02d%02d",
!               lctime->tm_year + 1900,
!               lctime->tm_mon+1,
!               lctime->tm_mday,
!               lctime->tm_hour,
!               lctime->tm_min);
!       tag = datestring;
!       std::ofstream ofs(tagfile.c_str());
!       if ( ofs )
          {
!         ofs << tag << std::endl;
!         ofs << this->GetTestModelString() << std::endl;
          }
!       ofs.close();
!       if ( verbose_tag )
          {
!         cmCTestLog(this, OUTPUT, "Create new tag: " << tag << " - "
!           << this->GetTestModelString() << std::endl);
          }
        }
      this->CurrentTag = tag;
      }
    return 1;
  }
  
  //----------------------------------------------------------------------
! bool cmCTest::InitializeFromCommand(cmCTestCommand* command, bool first)
  {
-   if ( !first && !this->CurrentTag.empty() )
-     {
-     return true;
-     }
- 
    std::string src_dir
      = this->GetCTestConfiguration("SourceDirectory").c_str();
--- 495,606 ----
          }
        }
+ 
+     // Create new "TAG" file or read existing one:
+     //
+     bool createNewTag = true;
+     if (command)
+       {
+       createNewTag = command->ShouldCreateNewTag();
+       }
+ 
      std::string tagfile = testingDir + "/TAG";
      std::ifstream tfin(tagfile.c_str());
      std::string tag;
! 
!     if (createNewTag)
        {
!       time_t tctime = time(0);
!       if ( this->TomorrowTag )
          {
!         tctime += ( 24 * 60 * 60 );
          }
!       struct tm *lctime = gmtime(&tctime);
!       if ( tfin && cmSystemTools::GetLineFromStream(tfin, tag) )
          {
!         int year = 0;
!         int mon = 0;
!         int day = 0;
!         int hour = 0;
!         int min = 0;
!         sscanf(tag.c_str(), "%04d%02d%02d-%02d%02d",
!                &year, &mon, &day, &hour, &min);
!         if ( year != lctime->tm_year + 1900 ||
!              mon != lctime->tm_mon+1 ||
!              day != lctime->tm_mday )
            {
!           tag = "";
            }
+         std::string tagmode;
+         if ( cmSystemTools::GetLineFromStream(tfin, tagmode) )
+           {
+           if (tagmode.size() > 4 && !this->Parts[PartStart])
+             {
+             this->TestModel = cmCTest::GetTestModelFromString(tagmode.c_str());
+             }
+           }
+         tfin.close();
          }
!       if (tag.size() == 0 || (0 != command) || this->Parts[PartStart])
          {
!         cmCTestLog(this, DEBUG, "TestModel: " << this->GetTestModelString()
!           << std::endl);
!         cmCTestLog(this, DEBUG, "TestModel: " << this->TestModel << std::endl);
!         if ( this->TestModel == cmCTest::NIGHTLY )
!           {
!           lctime = this->GetNightlyTime(
!             this->GetCTestConfiguration("NightlyStartTime"),
!             this->TomorrowTag);
!           }
!         char datestring[100];
!         sprintf(datestring, "%04d%02d%02d-%02d%02d",
!                 lctime->tm_year + 1900,
!                 lctime->tm_mon+1,
!                 lctime->tm_mday,
!                 lctime->tm_hour,
!                 lctime->tm_min);
!         tag = datestring;
!         std::ofstream ofs(tagfile.c_str());
!         if ( ofs )
!           {
!           ofs << tag << std::endl;
!           ofs << this->GetTestModelString() << std::endl;
!           }
!         ofs.close();
!         if ( 0 == command )
!           {
!           cmCTestLog(this, OUTPUT, "Create new tag: " << tag << " - "
!             << this->GetTestModelString() << std::endl);
!           }
          }
!       }
!     else
!       {
!       if ( tfin )
          {
!         cmSystemTools::GetLineFromStream(tfin, tag);
!         tfin.close();
          }
! 
!       if ( tag.empty() )
          {
!         cmCTestLog(this, ERROR_MESSAGE,
!           "Cannot read existing TAG file in " << testingDir
!           << std::endl);
!         return 0;
          }
+ 
+       cmCTestLog(this, OUTPUT, "  Use existing tag: " << tag << " - "
+         << this->GetTestModelString() << std::endl);
        }
+ 
      this->CurrentTag = tag;
      }
+ 
    return 1;
  }
  
  //----------------------------------------------------------------------
! bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command)
  {
    std::string src_dir
      = this->GetCTestConfiguration("SourceDirectory").c_str();
***************
*** 487,501 ****
        }
      }
!   else if ( !first )
      {
      cmCTestLog(this, WARNING, "Cannot locate CTest configuration: "
        << fname.c_str() << std::endl);
      }
-   else
-     {
-     cmCTestLog(this, HANDLER_OUTPUT, "   Cannot locate CTest configuration: "
-       << fname.c_str() << std::endl
-       << "   Delay the initialization of CTest" << std::endl);
-     }
  
    this->SetCTestConfigurationFromCMakeVariable(mf, "NightlyStartTime",
--- 630,638 ----
        }
      }
!   else
      {
      cmCTestLog(this, WARNING, "Cannot locate CTest configuration: "
        << fname.c_str() << std::endl);
      }
  
    this->SetCTestConfigurationFromCMakeVariable(mf, "NightlyStartTime",
***************
*** 517,526 ****
      }
  
!   if ( !this->Initialize(bld_dir.c_str(), true, false) )
      {
-     if ( this->GetCTestConfiguration("NightlyStartTime").empty() && first)
-       {
-       return true;
-       }
      return false;
      }
--- 654,659 ----
      }
  
!   if ( !this->Initialize(bld_dir.c_str(), command) )
      {
      return false;
      }
***************
*** 1717,1720 ****
--- 1850,1870 ----
      this->SetParallelLevel(plevel);
      }
+ 
+   if(this->CheckArgument(arg, "--no-compress-output"))
+     {
+     this->CompressTestOutput = false;
+     }
+ 
+   if(this->CheckArgument(arg, "--http1.0"))
+     {
+     this->UseHTTP10 = true;
+     }
+ 
+   if(this->CheckArgument(arg, "--timeout") && i < args.size() - 1)
+     {
+     i++;
+     double timeout = (double)atof(args[i].c_str());
+     this->GlobalTimeout = timeout;
+     }
    
    if(this->CheckArgument(arg, "-C", "--build-config") &&
***************
*** 2028,2031 ****
--- 2178,2186 ----
        }
  
+     if(this->CheckArgument(arg, "--schedule-random"))
+       {
+       this->ScheduleType = "Random";
+       }
+ 
      // pass the argument to all the handlers as well, but i may no longer be
      // set to what it was originally so I'm not sure this is working as
***************
*** 2108,2113 ****
          it->second->SetSubmitIndex(this->SubmitIndex);
          }
!       if ( !this->Initialize(
!           cmSystemTools::GetCurrentWorkingDirectory().c_str()) )
          {
          res = 12;
--- 2263,2268 ----
          it->second->SetSubmitIndex(this->SubmitIndex);
          }
!       std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
!       if(!this->Initialize(cwd.c_str(), 0))
          {
          res = 12;
***************
*** 2770,2772 ****
    cmCTestLog(this, HANDLER_OUTPUT, test_outputs << std::endl << std::flush);
  }
- 
--- 2925,2926 ----

Index: cmInstallTargetGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmInstallTargetGenerator.h,v
retrieving revision 1.30.2.1
retrieving revision 1.30.2.2
diff -C 2 -d -r1.30.2.1 -r1.30.2.2
*** cmInstallTargetGenerator.h	1 Oct 2009 21:21:05 -0000	1.30.2.1
--- cmInstallTargetGenerator.h	28 Jan 2010 21:47:57 -0000	1.30.2.2
***************
*** 64,67 ****
--- 64,81 ----
                                         const char* config,
                                         Indent const& indent);
+   typedef void (cmInstallTargetGenerator::*TweakMethod)(
+     std::ostream&, Indent const&, const char*, std::string const&
+     );
+   void AddTweak(std::ostream& os, Indent const& indent,
+                 const char* config, std::string const& file,
+                 TweakMethod tweak);
+   void AddTweak(std::ostream& os, Indent const& indent,
+                 const char* config, std::vector<std::string> const& files,
+                 TweakMethod tweak);
+   std::string GetDestDirPath(std::string const& file);
+   void PreReplacementTweaks(std::ostream& os, Indent const& indent,
+                             const char* config, std::string const& file);
+   void PostReplacementTweaks(std::ostream& os, Indent const& indent,
+                              const char* config, std::string const& file);
    void AddInstallNamePatchRule(std::ostream& os, Indent const& indent,
                                 const char* config,
***************
*** 75,82 ****
    
    void AddStripRule(std::ostream& os, Indent const& indent,
-                     cmTarget::TargetType type,
                      const std::string& toDestDirPath);
    void AddRanlibRule(std::ostream& os, Indent const& indent,
-                      cmTarget::TargetType type,
                       const std::string& toDestDirPath);
  
--- 89,94 ----

--- NEW FILE: cm_utf8.c ---
/*============================================================================
  CMake - Cross Platform Makefile Generator
  Copyright 2000-2009 Kitware, Inc., Insight Software Consortium

  Distributed under the OSI-approved BSD License (the "License");
  see accompanying file Copyright.txt for details.

  This software is distributed WITHOUT ANY WARRANTY; without even the
  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  See the License for more information.
============================================================================*/
#include "cm_utf8.h"

/*
  RFC 3629
  07-bit: 0xxxxxxx
  11-bit: 110xxxxx 10xxxxxx
  16-bit: 1110xxxx 10xxxxxx 10xxxxxx
  21-bit: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx

  Pre-RFC Compatibility
  26-bit: 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
  31-bit: 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
*/

/* Number of leading ones before a zero in the byte.  */
static unsigned char const cm_utf8_ones[256] = {
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
  2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,6,6,7,8
};

/* Mask away control bits from bytes with n leading ones.  */
static unsigned char const cm_utf8_mask[7] = {
  0xEF, 0x3F, 0x1F, 0x0F, 0x07, 0x03, 0x01
};

/* Minimum allowed value when first byte has n leading ones.  */
static unsigned int const cm_utf8_min[7] = {
  0, 0, 1u<<7, 1u<<11, 1u<<16, 1u<<21, 1u<<26 /*, 1u<<31 */
};

/*--------------------------------------------------------------------------*/
const char* cm_utf8_decode_character(const char* first, const char* last,
                                     unsigned int* pc)
{
  /* Count leading ones in the first byte.  */
  unsigned char c = *first++;
  unsigned char const ones = cm_utf8_ones[c];
  switch(ones)
    {
    case 0: *pc = c; return first;    /* One-byte character.  */
    case 1: case 7: case 8: return 0; /* Invalid leading byte.  */
    default: break;
    }

  /* Extract bits from this multi-byte character.  */
  {
  unsigned int uc = c & cm_utf8_mask[ones];
  unsigned char left;
  for(left = ones-1; left && first != last; --left)
    {
    c = *first++;
    if(cm_utf8_ones[c] != 1)
      {
      return 0;
      }
    uc = (uc << 6) | (c & cm_utf8_mask[1]);
    }

  if(left > 0 || uc < cm_utf8_min[ones])
    {
    return 0;
    }

  *pc = uc;
  return first;
  }
}

Index: cmGlobalVisualStudio8Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudio8Generator.cxx,v
retrieving revision 1.39.2.2
retrieving revision 1.39.2.3
diff -C 2 -d -r1.39.2.2 -r1.39.2.3
*** cmGlobalVisualStudio8Generator.cxx	28 Oct 2009 16:15:13 -0000	1.39.2.2
--- cmGlobalVisualStudio8Generator.cxx	28 Jan 2010 21:47:56 -0000	1.39.2.3
***************
*** 56,59 ****
--- 56,61 ----
  void cmGlobalVisualStudio8Generator::AddPlatformDefinitions(cmMakefile* mf)
  {
+   mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "X86");
+   mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "X86");
    mf->AddDefinition("MSVC80", "1");
  }

Index: cmGlobalVisualStudio71Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudio71Generator.cxx,v
retrieving revision 1.54.2.1
retrieving revision 1.54.2.2
diff -C 2 -d -r1.54.2.1 -r1.54.2.2
*** cmGlobalVisualStudio71Generator.cxx	1 Oct 2009 21:21:03 -0000	1.54.2.1
--- cmGlobalVisualStudio71Generator.cxx	28 Jan 2010 21:47:50 -0000	1.54.2.2
***************
*** 37,40 ****
--- 37,41 ----
  void cmGlobalVisualStudio71Generator::AddPlatformDefinitions(cmMakefile* mf)
  {
+   this->cmGlobalVisualStudio7Generator::AddPlatformDefinitions(mf);
    mf->AddDefinition("MSVC71", "1");
  }

Index: cmGlobalVisualStudio9Win64Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudio9Win64Generator.cxx,v
retrieving revision 1.1.6.1
retrieving revision 1.1.6.2
diff -C 2 -d -r1.1.6.1 -r1.1.6.2
*** cmGlobalVisualStudio9Win64Generator.cxx	1 Oct 2009 21:21:04 -0000	1.1.6.1
--- cmGlobalVisualStudio9Win64Generator.cxx	28 Jan 2010 21:47:56 -0000	1.1.6.2
***************
*** 40,48 ****
  }
  
  void cmGlobalVisualStudio9Win64Generator
! ::EnableLanguage(std::vector<std::string>const &  lang, 
!                  cmMakefile *mf, bool optional)
  {
    mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE");
!   cmGlobalVisualStudio9Generator::EnableLanguage(lang, mf, optional);
  }
--- 40,50 ----
  }
  
+ //----------------------------------------------------------------------------
  void cmGlobalVisualStudio9Win64Generator
! ::AddPlatformDefinitions(cmMakefile* mf)
  {
+   cmGlobalVisualStudio9Generator::AddPlatformDefinitions(mf);
    mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE");
!   mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "x64");
!   mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "x64");
  }

Index: cmCacheManager.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCacheManager.cxx,v
retrieving revision 1.113.2.1
retrieving revision 1.113.2.2
diff -C 2 -d -r1.113.2.1 -r1.113.2.2
*** cmCacheManager.cxx	1 Oct 2009 21:20:36 -0000	1.113.2.1
--- cmCacheManager.cxx	28 Jan 2010 21:47:49 -0000	1.113.2.2
***************
*** 23,30 ****
  #include <cmsys/RegularExpression.hxx>
  
- #if defined(_WIN32) || defined(__CYGWIN__)
- # include <windows.h>
- #endif // _WIN32
- 
  const char* cmCacheManagerTypes[] =
  { "BOOL",
--- 23,26 ----

Index: cmSetTestsPropertiesCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSetTestsPropertiesCommand.h,v
retrieving revision 1.12.2.1
retrieving revision 1.12.2.2
diff -C 2 -d -r1.12.2.1 -r1.12.2.2
*** cmSetTestsPropertiesCommand.h	1 Oct 2009 21:21:08 -0000	1.12.2.1
--- cmSetTestsPropertiesCommand.h	28 Jan 2010 21:47:58 -0000	1.12.2.2
***************
*** 65,76 ****
        "Both PASS_REGULAR_EXPRESSION and FAIL_REGULAR_EXPRESSION expect a "
        "list of regular expressions.\n"
!       "PROCESSORS: Denotes the number of processors that this test will "
!       "require. This is typically used for MPI tests, and should be used in "
!       "conjunction with the ctest_test PARALLEL_LEVEL option.\n"
!       "COST: Set this to a floating point value. Tests in a test set will be "
!       "run in descending order of cost.\n"
!       "RUN_SERIAL: If set to true, this test will not run in parallel with "
!       "any other tests. This should be used in conjunction with "
!       "the ctest_test PARALLEL_LEVEL option.\n";
      }
  
--- 65,70 ----
        "Both PASS_REGULAR_EXPRESSION and FAIL_REGULAR_EXPRESSION expect a "
        "list of regular expressions.\n"
!       "TIMEOUT: Setting this will limit the test runtime to the number of "
!       "seconds specified.\n";
      }
  

Index: cmVisualStudio10TargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmVisualStudio10TargetGenerator.cxx,v
retrieving revision 1.15.2.2
retrieving revision 1.15.2.3
diff -C 2 -d -r1.15.2.2 -r1.15.2.3
*** cmVisualStudio10TargetGenerator.cxx	28 Oct 2009 16:15:31 -0000	1.15.2.2
--- cmVisualStudio10TargetGenerator.cxx	28 Jan 2010 21:48:00 -0000	1.15.2.3
***************
*** 397,400 ****
--- 397,401 ----
    std::vector<cmSourceFile*> none;
    std::vector<cmSourceFile*> headers;
+   std::vector<cmSourceFile*> resource;
    
    for(std::vector<cmSourceFile*>::const_iterator s = classes.begin(); 
***************
*** 418,421 ****
--- 419,426 ----
        clCompile.push_back(sf);
        }
+     if(strcmp(lang, "RC") == 0)
+       {
+       resource.push_back(sf);
+       }
      else if(sf->GetCustomCommand())
        {
***************
*** 449,452 ****
--- 454,458 ----
    this->WriteGroupSources("ClCompile", clCompile, sourceGroups);
    this->WriteGroupSources("ClInclude", headers, sourceGroups);
+   this->WriteGroupSources("ResourceCompile", resource, sourceGroups);
    this->WriteGroupSources("CustomBuild", customBuild, sourceGroups);
  
***************
*** 569,603 ****
        const char* lang = (*source)->GetLanguage();
        bool cl = lang && (strcmp(lang, "C") == 0 || strcmp(lang, "CXX") ==0);
          {
!         std::string sourceFile = (*source)->GetFullPath();
!         sourceFile =  cmSystemTools::RelativePath(
!           this->Makefile->GetCurrentOutputDirectory(),
!           sourceFile.c_str());
!         this->ConvertToWindowsSlash(sourceFile);
!         // output the source file
!         if(header)
!           {
!           this->WriteString("<ClInclude Include=\"", 2);
!           }
!         else if(cl)
!           {
!           this->WriteString("<ClCompile Include=\"", 2);
!           }
!         else
!           {
!           this->WriteString("<None Include=\"", 2);
!           }
!         (*this->BuildFileStream ) << sourceFile << "\"";
!         // ouput any flags specific to this source file
!         if(cl && this->OutputSourceSpecificFlags(*source))
!           {
!           // if the source file has specific flags the tag
!           // is ended on a new line
!           this->WriteString("</ClCompile>\n", 2);
!           }
!         else
!           {
!           (*this->BuildFileStream ) << " />\n";
!           }
          }
        }
--- 575,612 ----
        const char* lang = (*source)->GetLanguage();
        bool cl = lang && (strcmp(lang, "C") == 0 || strcmp(lang, "CXX") ==0);
+       bool rc = lang && (strcmp(lang, "RC") == 0);
+       std::string sourceFile = (*source)->GetFullPath();
+       sourceFile =  cmSystemTools::RelativePath(
+         this->Makefile->GetCurrentOutputDirectory(),
+         sourceFile.c_str());
+       this->ConvertToWindowsSlash(sourceFile);
+       // output the source file
+       if(header)
          {
!         this->WriteString("<ClInclude Include=\"", 2);
!         }
!       else if(cl)
!         {
!         this->WriteString("<ClCompile Include=\"", 2);
!         }
!       else if(rc)
!         {
!         this->WriteString("<ResourceCompile Include=\"", 2);
!         }
!       else
!         {
!         this->WriteString("<None Include=\"", 2);
!         }
!       (*this->BuildFileStream ) << sourceFile << "\"";
!       // ouput any flags specific to this source file
!       if(cl && this->OutputSourceSpecificFlags(*source))
!         {
!         // if the source file has specific flags the tag
!         // is ended on a new line
!         this->WriteString("</ClCompile>\n", 2);
!         }
!       else
!         {
!         (*this->BuildFileStream ) << " />\n";
          }
        }
***************
*** 1223,1226 ****
--- 1232,1236 ----
                  cmLocalGenerator::START_OUTPUT,
                  cmLocalGenerator::UNCHANGED);
+       this->ConvertToWindowsSlash(path);
        libstring += sep;
        libstring += path;

Index: cmStandardIncludes.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmStandardIncludes.h,v
retrieving revision 1.76.2.2
retrieving revision 1.76.2.3
diff -C 2 -d -r1.76.2.2 -r1.76.2.3
*** cmStandardIncludes.h	11 Nov 2009 18:34:16 -0000	1.76.2.2
--- cmStandardIncludes.h	28 Jan 2010 21:47:59 -0000	1.76.2.3
***************
*** 38,41 ****
--- 38,42 ----
  #ifdef __ICL
  #pragma warning ( disable : 985 )
+ #pragma warning ( disable : 1572 ) /* floating-point equality test */
  #endif
  

Index: cmExtraEclipseCDT4Generator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmExtraEclipseCDT4Generator.h,v
retrieving revision 1.11.2.1
retrieving revision 1.11.2.2
diff -C 2 -d -r1.11.2.1 -r1.11.2.2
*** cmExtraEclipseCDT4Generator.h	1 Oct 2009 21:20:59 -0000	1.11.2.1
--- cmExtraEclipseCDT4Generator.h	28 Jan 2010 21:47:49 -0000	1.11.2.2
***************
*** 57,72 ****
    void CreateCProjectFile() const;
  
-   // Eclipse supported toolchain types
-   enum EclipseToolchainType
-     {
-     EclipseToolchainOther,
-     EclipseToolchainLinux,
-     EclipseToolchainCygwin,
-     EclipseToolchainMinGW,
-     EclipseToolchainSolaris,
-     EclipseToolchainMacOSX
-     };
-   static EclipseToolchainType GetToolChainType(const cmMakefile& makefile);
- 
    // If built with cygwin cmake, convert posix to windows path.
    static std::string GetEclipsePath(const std::string& path);
--- 57,60 ----
***************
*** 113,116 ****
--- 101,107 ----
                                     std::set<std::string>& emittedDirs);
  
+   static void AddEnvVar(cmGeneratedFileStream& fout, const char* envVar, 
+                         cmMakefile* mf);
+ 
    std::vector<std::string> SrcLinkedResources;
    std::vector<std::string> OutLinkedResources;



More information about the Cmake-commits mailing list