diff options
author | Brad King <brad.king@kitware.com> | 2009-02-10 13:50:09 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-02-10 13:50:09 (GMT) |
commit | d0ed46e3d66beead514ee8d95789b5ee56151812 (patch) | |
tree | bf28abb292ab6bd29a3f4452bc734cd4dca8263f /Source/cmTarget.cxx | |
parent | ffba5b14aec7dd3c63cea507de2d4694b2c49d38 (diff) | |
download | CMake-d0ed46e3d66beead514ee8d95789b5ee56151812.zip CMake-d0ed46e3d66beead514ee8d95789b5ee56151812.tar.gz CMake-d0ed46e3d66beead514ee8d95789b5ee56151812.tar.bz2 |
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.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index ae250d4..18a7c50 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -866,6 +866,17 @@ cmListFileBacktrace const& cmTarget::GetBacktrace() const } //---------------------------------------------------------------------------- +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() { return (this->GetType() == cmTarget::EXECUTABLE && |