[Cmake-commits] [cmake-commits] king committed cmMakefileExecutableTargetGenerator.cxx 1.46 1.47 cmMakefileLibraryTargetGenerator.cxx 1.58 1.59 cmTarget.cxx 1.212 1.213 cmTarget.h 1.111 1.112

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Apr 7 13:39:15 EDT 2008


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

Modified Files:
	cmMakefileExecutableTargetGenerator.cxx 
	cmMakefileLibraryTargetGenerator.cxx cmTarget.cxx cmTarget.h 
Log Message:
BUG: Do not create target output directory in cmTarget.  Let the generators do it.


Index: cmMakefileLibraryTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileLibraryTargetGenerator.cxx,v
retrieving revision 1.58
retrieving revision 1.59
diff -C 2 -d -r1.58 -r1.59
*** cmMakefileLibraryTargetGenerator.cxx	27 Feb 2008 22:10:45 -0000	1.58
--- cmMakefileLibraryTargetGenerator.cxx	7 Apr 2008 17:39:13 -0000	1.59
***************
*** 370,377 ****
--- 370,379 ----
      {
      outpath = this->Target->GetDirectory();
+     cmSystemTools::MakeDirectory(outpath.c_str());
      outpath += "/";
      if(!targetNameImport.empty())
        {
        outpathImp = this->Target->GetDirectory(0, true);
+       cmSystemTools::MakeDirectory(outpathImp.c_str());
        outpathImp += "/";
        }

Index: cmTarget.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.h,v
retrieving revision 1.111
retrieving revision 1.112
diff -C 2 -d -r1.111 -r1.112
*** cmTarget.h	13 Mar 2008 20:35:39 -0000	1.111
--- cmTarget.h	7 Apr 2008 17:39:13 -0000	1.112
***************
*** 465,471 ****
  
    // Get the full path to the target output directory.
-   const char* GetAndCreateOutputDir(bool implib, bool create);
- 
-   // Get the full path to the target output directory.
    const char* GetOutputDir(bool implib);
  
--- 465,468 ----

Index: cmMakefileExecutableTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileExecutableTargetGenerator.cxx,v
retrieving revision 1.46
retrieving revision 1.47
diff -C 2 -d -r1.46 -r1.47
*** cmMakefileExecutableTargetGenerator.cxx	27 Feb 2008 22:10:45 -0000	1.46
--- cmMakefileExecutableTargetGenerator.cxx	7 Apr 2008 17:39:13 -0000	1.47
***************
*** 148,154 ****
--- 148,156 ----
    else
      {
+     cmSystemTools::MakeDirectory(outpath.c_str());
      if(!targetNameImport.empty())
        {
        outpathImp = this->Target->GetDirectory(0, true);
+       cmSystemTools::MakeDirectory(outpathImp.c_str());
        outpathImp += "/";
        }

Index: cmTarget.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.cxx,v
retrieving revision 1.212
retrieving revision 1.213
diff -C 2 -d -r1.212 -r1.213
*** cmTarget.cxx	1 Apr 2008 18:22:07 -0000	1.212
--- cmTarget.cxx	7 Apr 2008 17:39:13 -0000	1.213
***************
*** 1654,1658 ****
      {
      // Do not create the directory when config is given:
!     this->Directory = this->GetAndCreateOutputDir(implib, true);
      // Add the configuration's subdirectory.
      this->Makefile->GetLocalGenerator()->GetGlobalGenerator()->
--- 1654,1658 ----
      {
      // Do not create the directory when config is given:
!     this->Directory = this->GetOutputDir(implib);
      // Add the configuration's subdirectory.
      this->Makefile->GetLocalGenerator()->GetGlobalGenerator()->
***************
*** 2846,2850 ****
  
  //----------------------------------------------------------------------------
! const char* cmTarget::GetAndCreateOutputDir(bool implib, bool create)
  {
    // The implib option is only allowed for shared libraries, module
--- 2846,2850 ----
  
  //----------------------------------------------------------------------------
! const char* cmTarget::GetOutputDir(bool implib)
  {
    // The implib option is only allowed for shared libraries, module
***************
*** 2863,2867 ****
       !this->Makefile->GetDefinition("CMAKE_IMPORT_LIBRARY_SUFFIX"))
      {
!     std::string msg =  "GetAndCreateOutputDir, imlib set but there is no "
        "CMAKE_IMPORT_LIBRARY_SUFFIX for target: ";
      msg += this->GetName();
--- 2863,2867 ----
       !this->Makefile->GetDefinition("CMAKE_IMPORT_LIBRARY_SUFFIX"))
      {
!     std::string msg =  "GetOutputDir, imlib set but there is no "
        "CMAKE_IMPORT_LIBRARY_SUFFIX for target: ";
      msg += this->GetName();
***************
*** 2988,3001 ****
        out += ".framework";
        }
- 
-     // Optionally make sure the output path exists on disk.
-     if(create)
-       {
-       if(!cmSystemTools::MakeDirectory(out.c_str()))
-         {
-         cmSystemTools::Error("Error failed to create output directory: ",
-                              out.c_str());
-         }
-       }
    }
  
--- 2988,2991 ----
***************
*** 3004,3013 ****
  
  //----------------------------------------------------------------------------
- const char* cmTarget::GetOutputDir(bool implib)
- {
-   return this->GetAndCreateOutputDir(implib, true);
- }
- 
- //----------------------------------------------------------------------------
  const char* cmTarget::GetExportMacro()
  {
--- 2994,2997 ----



More information about the Cmake-commits mailing list