[Cmake-commits] [cmake-commits] king committed cmTarget.cxx 1.232 1.233 cmTarget.h 1.120 1.121

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Feb 10 08:50:11 EST 2009


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

Modified Files:
	cmTarget.cxx cmTarget.h 
Log Message:
ENH: Define target-specific support directories

This creates method cmTarget::GetSupportDirectory to compute a
target-specific support directory in the build tree.  It uses the
"CMakeFiles/<name>.dir" convention already used by the Makefile
generators.  The method will be useful for any code that needs to
generate per-target information into the build tree for use by CMake
tools that do not run at generate time.


Index: cmTarget.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.h,v
retrieving revision 1.120
retrieving revision 1.121
diff -C 2 -d -r1.120 -r1.121
*** cmTarget.h	4 Sep 2008 21:34:24 -0000	1.120
--- cmTarget.h	10 Feb 2009 13:50:09 -0000	1.121
***************
*** 416,419 ****
--- 416,422 ----
    cmListFileBacktrace const& GetBacktrace() const;
  
+   /** Get a build-tree directory in which to place target support files.  */
+   std::string GetSupportDirectory() const;
+ 
  private:
    /**

Index: cmTarget.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.cxx,v
retrieving revision 1.232
retrieving revision 1.233
diff -C 2 -d -r1.232 -r1.233
*** cmTarget.cxx	20 Jan 2009 20:49:37 -0000	1.232
--- cmTarget.cxx	10 Feb 2009 13:50:09 -0000	1.233
***************
*** 867,870 ****
--- 867,881 ----
  
  //----------------------------------------------------------------------------
+ std::string cmTarget::GetSupportDirectory() const
+ {
+   std::string dir = this->Makefile->GetCurrentOutputDirectory();
+   dir += cmake::GetCMakeFilesDirectory();
+   dir += "/";
+   dir += this->Name;
+   dir += ".dir";
+   return dir;
+ }
+ 
+ //----------------------------------------------------------------------------
  bool cmTarget::IsExecutableWithExports()
  {



More information about the Cmake-commits mailing list