[Cmake-commits] [cmake-commits] hoffman committed cmGlobalUnixMakefileGenerator3.cxx 1.126.2.4 1.126.2.5 cmMakefileExecutableTargetGenerator.cxx 1.46.2.3 1.46.2.4 cmake.cxx 1.375.2.16 1.375.2.17

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Feb 6 16:15:19 EST 2009


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

Modified Files:
      Tag: CMake-2-6
	cmGlobalUnixMakefileGenerator3.cxx 
	cmMakefileExecutableTargetGenerator.cxx cmake.cxx 
Log Message:
ENH: fix osx bundle re-config issue on branch RC 12


Index: cmGlobalUnixMakefileGenerator3.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalUnixMakefileGenerator3.cxx,v
retrieving revision 1.126.2.4
retrieving revision 1.126.2.5
diff -C 2 -d -r1.126.2.4 -r1.126.2.5
*** cmGlobalUnixMakefileGenerator3.cxx	6 Aug 2008 21:04:19 -0000	1.126.2.4
--- cmGlobalUnixMakefileGenerator3.cxx	6 Feb 2009 21:15:16 -0000	1.126.2.5
***************
*** 353,368 ****
        lg->Convert(tmpStr.c_str(),cmLocalGenerator::HOME_OUTPUT).c_str() 
                      << "\"\n";
-     const std::vector<std::string>& outfiles = 
-       lg->GetMakefile()->GetOutputFiles();
-     for(std::vector<std::string>::const_iterator k= outfiles.begin();
-         k != outfiles.end(); ++k)
-       {
-       cmakefileStream << "  \"" << 
-         lg->Convert(k->c_str(),cmLocalGenerator::HOME_OUTPUT).c_str() 
-                       << "\"\n";
-       }
      }
    cmakefileStream << "  )\n\n";
  
    this->WriteMainCMakefileLanguageRules(cmakefileStream, 
                                          this->LocalGenerators);
--- 353,376 ----
        lg->Convert(tmpStr.c_str(),cmLocalGenerator::HOME_OUTPUT).c_str() 
                      << "\"\n";
      }
    cmakefileStream << "  )\n\n";
  
+   // CMake must rerun if a byproduct is missing.
+   {
+   cmakefileStream
+     << "# Byproducts of CMake generate step:\n"
+     << "SET(CMAKE_MAKEFILE_PRODUCTS\n";
+   const std::vector<std::string>& outfiles =
+     lg->GetMakefile()->GetOutputFiles();
+   for(std::vector<std::string>::const_iterator k = outfiles.begin();
+       k != outfiles.end(); ++k)
+     {
+     cmakefileStream << "  \"" <<
+       lg->Convert(k->c_str(),cmLocalGenerator::HOME_OUTPUT).c_str()
+                     << "\"\n";
+     }
+   cmakefileStream << "  )\n\n";
+   }
+ 
    this->WriteMainCMakefileLanguageRules(cmakefileStream, 
                                          this->LocalGenerators);

Index: cmMakefileExecutableTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileExecutableTargetGenerator.cxx,v
retrieving revision 1.46.2.3
retrieving revision 1.46.2.4
diff -C 2 -d -r1.46.2.3 -r1.46.2.4
*** cmMakefileExecutableTargetGenerator.cxx	24 Oct 2008 15:18:52 -0000	1.46.2.3
--- cmMakefileExecutableTargetGenerator.cxx	6 Feb 2009 21:15:16 -0000	1.46.2.4
***************
*** 477,482 ****
    outpath += "MacOS";
    cmSystemTools::MakeDirectory(outpath.c_str());
    outpath += "/";
-   this->Makefile->AddCMakeDependFile(outpath.c_str());
  
    // Configure the Info.plist file.  Note that it needs the executable name
--- 477,482 ----
    outpath += "MacOS";
    cmSystemTools::MakeDirectory(outpath.c_str());
+   this->Makefile->AddCMakeOutputFile(outpath.c_str());
    outpath += "/";
  
    // Configure the Info.plist file.  Note that it needs the executable name
***************
*** 486,489 ****
                                                 targetName.c_str(),
                                                 plist.c_str());
!   this->Makefile->AddCMakeDependFile(plist.c_str());
  }
--- 486,489 ----
                                                 targetName.c_str(),
                                                 plist.c_str());
!   this->Makefile->AddCMakeOutputFile(plist.c_str());
  }

Index: cmake.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.cxx,v
retrieving revision 1.375.2.16
retrieving revision 1.375.2.17
diff -C 2 -d -r1.375.2.16 -r1.375.2.17
*** cmake.cxx	13 Jan 2009 18:03:53 -0000	1.375.2.16
--- cmake.cxx	6 Feb 2009 21:15:16 -0000	1.375.2.17
***************
*** 2655,2658 ****
--- 2655,2680 ----
      }
  
+   // If any byproduct of makefile generation is missing we must re-run.
+   std::vector<std::string> products;
+   if(const char* productStr = mf->GetDefinition("CMAKE_MAKEFILE_PRODUCTS"))
+     {
+     cmSystemTools::ExpandListArgument(productStr, products);
+     }
+   for(std::vector<std::string>::const_iterator pi = products.begin();
+       pi != products.end(); ++pi)
+     {
+     if(!(cmSystemTools::FileExists(pi->c_str()) ||
+          cmSystemTools::FileIsSymlink(pi->c_str())))
+       {
+       if(verbose)
+         {
+         cmOStringStream msg;
+         msg << "Re-run cmake, missing byproduct: " << *pi << "\n";
+         cmSystemTools::Stdout(msg.str().c_str());
+         }
+       return 1;
+       }
+     }
+ 
    // Get the set of dependencies and outputs.
    std::vector<std::string> depends;



More information about the Cmake-commits mailing list