summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-10-12 14:26:15 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-10-12 14:26:15 (GMT)
commit762108f3ec60ca717cdba369dffc84459a7e3282 (patch)
treec5c294b462c953d9087bb9dc85ad89a2889af19f /Source/cmLocalGenerator.cxx
parentf3fa7c6bc364a523ba7a437402603fd84c6c9e4b (diff)
parent223d0efe55ff66f6ceb25ecdfbd1d915c76af548 (diff)
downloadCMake-762108f3ec60ca717cdba369dffc84459a7e3282.zip
CMake-762108f3ec60ca717cdba369dffc84459a7e3282.tar.gz
CMake-762108f3ec60ca717cdba369dffc84459a7e3282.tar.bz2
Merge topic 'add-cmLocalGenerator-API'
223d0efe Remove some needless GetMakefile() calls. a367416c cmLocalGenerator: Add current source directory accessor. bbef3c2d cmLocalGenerator: Add current binary directory accessor. 12cb3bdc cmLocalGenerator: Add Home directory accessors. 72efa15d Eclipse: Port API to cmLocalGenerator. f2a641d6 Kate: Remove unused variables. 10cf42f5 Kate: Port API to cmLocalGenerator. e46ef270 export: Port internal method to cmGeneratorTarget. 53d3a1c9 cmMakefile: Remove unused GetProjectName calls. 4ab2750c cmLocalGenerator: Add GetProjectName method. c8187f41 cmCPluginAPI: Inline code to get project name. 8c6e6dd3 cmMakefile: Inline initialization of project name. 27916f2c cmLocalGenerator: Add cmake instance accessor.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx30
1 files changed, 30 insertions, 0 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index b26151c..c0c50c4 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2431,6 +2431,11 @@ const char* cmLocalGenerator::GetFeature(const std::string& feature,
return 0;
}
+std::string cmLocalGenerator::GetProjectName() const
+{
+ return this->StateSnapshot.GetProjectName();
+}
+
//----------------------------------------------------------------------------
std::string
cmLocalGenerator::ConstructComment(cmCustomCommandGenerator const& ccg,
@@ -2858,6 +2863,31 @@ cmLocalGenerator
return source.GetLanguage();
}
+cmake* cmLocalGenerator::GetCMakeInstance() const
+{
+ return this->GlobalGenerator->GetCMakeInstance();
+}
+
+const char* cmLocalGenerator::GetSourceDirectory() const
+{
+ return this->GetCMakeInstance()->GetHomeDirectory();
+}
+
+const char* cmLocalGenerator::GetBinaryDirectory() const
+{
+ return this->GetCMakeInstance()->GetHomeOutputDirectory();
+}
+
+const char* cmLocalGenerator::GetCurrentBinaryDirectory() const
+{
+ return this->StateSnapshot.GetDirectory().GetCurrentBinary();
+}
+
+const char* cmLocalGenerator::GetCurrentSourceDirectory() const
+{
+ return this->StateSnapshot.GetDirectory().GetCurrentSource();
+}
+
//----------------------------------------------------------------------------
std::string
cmLocalGenerator::GetTargetDirectory(cmTarget const&) const